#2048-ai
Now your computer can lose for you!
###Instructions
- Go to http://gabrielecirulli.github.io/2048/
- Play until you're bored and/or frustrated
- Press F12 to open your web console
- Paste in the following and press enter:
var s = document.createElement('script'); s.src='https://rawgit.com/j201/2048-ai/master/ai.js'; document.body.appendChild(s);
- Sit back and enjoy!
###Algorithm
This uses a super-secret hyper-intelligent neural network algorithm recovered from Soviet submarine navigation computers that definitely doesn't just check for adjacent matching tiles and makes a random move if it can't find any. As per the Столи́чная act of 1973, you are hereby forbidden from looking at the algorithm in ai.js. Non-compliance is punishable by 10 years forced labour in Siberia.
###But will it win?
I think I saw it get to 512 once, I dunno.
###It isn't working!
If you're using a recent version of Firefox or Chrome, file an issue. If you're not, find a large stick and whack yourself on the head until you smarten up.