It's like watching War Games - http://www.youtube.com/watch?v=NHWjlCaIrQo
Colossus by Dennis Feltham Jones
( don't read the wikipedia entry as it contains spoilers ( whole plot ) )
71–80 of 197 posts
It's like watching War Games - http://www.youtube.com/watch?v=NHWjlCaIrQo
Colossus by Dennis Feltham Jones
( don't read the wikipedia entry as it contains spoilers ( whole plot ) )
It gets so close! http://puu.sh/7rrD6.png I find it frustrating to watch it hit (where I have not managed to get to) where you have one block 128, 256, 512, and a 1024. Moving around only makes it harder to join things together. I am rather convinced this game is more by luck than actual good-play.
I'm running some trials here and keeping track of the results with this AI. I'll edit this when I have the data to provide the information. Something that occurred to me is that "score" and "winning" can have different optimizations. Score is based upon combining blocks, where as winning is based upon reaching the 2048 block. This means the game can be optimzed in two different ways: 1) To maximize score, wherein you…
What are the rules for new tile placement? Is it deterministic, random, or adversarial?
Random location (uniform). 90% chance of a 2, 10% chance of a 4. This actually made it hard to model the computer move in the search.
1. "tumbler" until 128 can move to the upper left corner (up right down left, repeat)
2. The highest number on the board is always in the upper left. Make the top row descend left to right.
3. Before combining values on the top row, keep hitting up until one of the lower rows will not combine from a left.
4. Often, the slot you are filling (eg, top right or one below top right) will have a two. Alternate pressing left and right until a two appears, allowing you to combine
5. Keep the second row locked as soon as possible with unique values ASCENDING left to right. This way you can use up, left and right without moving the slot you are filling on the far left of the second row.
6. Never fill the top three rows such that a left or right cannot be used. You will be forced to use a down, messing up the top row.
There are a few other pattern recognition tricks that you'll pick up to aid in filling a slot for higher values. Other misc tips:
* try to keep high number squares close together, and merge up to the top row as soon as possible. Otherwise, they will just close off a slot
* You may get a 2 trapped on the top row blocked by a higher value below it. Unfreeze the second row by combining squares & hope that a two appears in the new opening
* only 2's or 4's will appear. They (always?) appear in the space left behind by the previous movement
Is this game always guaranteed to be winnable, or is it like Solitaire?
edit: I used 'look' 3 times in the last 20 words, what's wrong with me
Hahah, I knew this was coming sooner or later. Thanks! Great job! EDIT: This AI is a better player than me.
The AI implements minimax using alpha-beta pruning. Minimax assumes that the game/computer which the AI is playing against is playing adversarially - i.e. that the computer will insert the new tile that's the worst possible tile for the player/AI to receive. But that's not actually what the game is doing. Instead, new tiles are inserted randomly. As a result, minimax probably isn't the best approach here. I think som…
Heh. If you look in the code you'll see a big commented out chunk where I tried randomly sampling computer moves to get sort of an 'expected value' for the opposition's move. Empirically, it performed worse. I think this is for the same reason that all minimax algos assume optimal play by the opponent: if you assume optimal and they play less than so, it can only work in your favor. However I think there's some truth…