badmephisto
This is my second attempt in producing AI for Tetris.
Grid size is 10×20
I made this in Python
It almost always does more than 1000 lines, and most I’ve seen it do was about 5000. Unfortunately I don’t possess enough computing resources to have it learn more and fine tune the parameters as much as I’d like, but this will do for now! 🙂
music: Tetris by 2am
Source
True, it would be extremely difficult, but it is definitely possible. They already have AI for some RTS games, but they tend to be inefficient.
My goal would be to make the AI incredibly efficient with resources and units and scout out enemy weaknesses to make the most of the units at hand.
There are a bunch of really hard problems that need to be overcome. How do you decide what units/buildings the AI will build? Take a game like Supreme Commander: there are so many possibilities that it's hard to imagine a computer succeeding without having a general "strategy".
Indeed, I think the best way to go about AI for RTS games is to have the AI analyze the situation and develop a rough 'plan'. You then work towards efficiency of resources and unit orders (etc. etc.). Just an idea.
I think the Starcraft 2 AI is supposed to counter by scouting. There are some rather 'intelligent' starcraft 1 AI's made by fans already.
But right now ~ no AI can beat a human fairly in an rts like Starcraft or SupCom without the use of reaction speed abuse.
Has a tetris AI been invented that works perfectly or beats humans? On youtube some people do just as well as this AI.
The tetris wiki says not much has been done for a tetris AI. I'm talking about if the computer doesn't cheat by looking at the seed in advance.
Yes, I meant by raw score 🙁
Pretty soon they'll start beating us in RTS's fairly…
I just wasn't sure if a computer could beat a human because its algorithm wasn't smart enough. Speed was never the issue.
wow… this thing plays tetris better than i can o.o
cool !!!!!!!!!!!!!
does this operate off of a simple possible placement evaluation scale?
Where placements are weighed, and then the highest value place is chosen.
The weight would likely be based on height, and snugness.
@TheReasonWhyGuy yep, from experience I came up with a bunch of metrics for whats good and whats bad about placing anything at any spot. The "learning" here is just finding what weights give best performance. It's not nuclear science indeed 🙂 still works pretty well, but I'm sure it's possible to do much better.
Is this speed up or in real-time?
@PeopleR2sensitive its fo' real
Random awesomeness of the day!! I would love to take a look at source code for this if you would like to share. I found a Tetris AI written in Pascal on sourceforge, but I'm more familiar with python so i would love to learn from this if possible. thanks for distracting me from the tedium at work!
Awesome!
is it possible to see the source code? I'm new at AI and would really like a little peek inside this
@badmephisto No, the optimum placement for the 5 2x2s around 1:06 was 1st and 2nd piece into the 1×4 gap (columns 6-9) in the 2nd row, 3rd piece into the then existing 1×2 gap (columns 4-5) in the 3rd row, 4th and 5th piece again columns 6-9, row 4. It is absolutely crucial to keep things level. Stacking (while having positions for gapless placement) brutally decreases the flexibility of what you can do with future pieces. A PROPER Tetris AI is EXTREMELY, almost impossibly, difficult to create.
@badmephisto The problem of Tetris is that the speed should gradually increase indefinitely, putting too much pressure on ANY AI (AI optimization just a matter of delaying the ultimate loss, not preventing it). But even with constant low speed, there is a situation, sooner or later, due to the "completely random" (in an ideal world) selection of pieces, that even the best possible AI (considering all available information) cannot solve. From this standpoint, I don't like Tetris. 🙂
@badmephisto It is e.g. like Minesweeper – there are OFTEN situations that are completely impossible to solve (with certainty, not just high probability). And the game LOOKS simple as well.
this is pretty cool, but can it solve a rubiks cube?
but the real question is… WILL IT BLEND?
But can it do this on facebook tetris?
Programming the Canvas of the 21st century.
I wonder if there's one that can go on forever.
How hard would it be to make neraul net play Tetris? Would it be of Any use?
I challenge you to program it to ONLY solve lines with double t-spins 😀
I don't understand videos like this. Without any narration, I have no way of knowing what is supposed to be happening. Teaching a computer to play Tetris shouldn't take much in the way of artificial intelligence, however. It mainly just requires total attention, persistence and lightning fast reflexes, all things computers excel at.
It's weird to see this has been going on for so long. This guy didn't look like it, but he is a pioneer.