- Created Thursday, May 5th 2016 @ 19:16:45
This is for a class, we are meant to post our code here. Please do not remove this post.
- Updated Thursday, May 5th 2016 @ 20:41:46
Haha there are a lot of you guys here. Pretty cool you guys are doing this for a university class. I wish my university did something like this :P
Maybe post a little more information about your bot and strategy to discuss? Anything cool you implemented?
- Created Thursday, May 5th 2016 @ 22:49:36
Yea it was a wicked cool project to get going! It's funny, time is always the killer for things like this.
It's for our intro AI course, and we were meant to implement some sort of learning algorithm (genetic programming, A*, BFS/DFS, RL) for any of the games on this site. Most of my time was spent figuring out error metrics rather than tuning their importance. I wish I could have done more, but my two main error metrics were:
1) Of every row that has a block in it, how many are empy? 2) Of every column, how many empty spots are there under the first block?
I couldn't quite figure out how to tune those two, and I had a handful of other ideas that I never got through implementing, but it was a ton of fun - I plan on improving my code for fun (since this project is due tonight, so there's no real incentive to keep going from a class perspective, and there's no way my Python3 code will be the best in the long run).
- Created Friday, May 13th 2016 @ 09:51:15
Why Python? For this kind of challanges, is not the most logical choice. And A*, VFS/DFS are not the most logical strategies to apply here I would say.
- Created Friday, May 13th 2016 @ 12:03:09
Python is probably chosen as it is taught as a first language in many universities.
- Created Friday, May 13th 2016 @ 21:53:37
What's wrong with A*, if you don't mind me asking? Too slow? Is there a good alternative that always finds the shortest path if one exists?
- Updated Saturday, May 14th 2016 @ 11:55:38
There is nothing wrong with A*. If you have want to play a T-spin or placing blocks in holes you have to. But for the majority of your moves, you just can scan the board, start with roting and then drop the block.
Actually, Kubisme has a quick scan on potential holes it can fill, if the can not be found, it will not try that (relative) slow path. The default drop moves are easier to find, and only if there is no space anymore, or if there are less than four rows it will play downs.
So A* is not something you should start with (I only started implementing it at version 16, when my bot was a solid top-5 bot). Taking the second block, into account, and also trying to search deeper (up to 6 ply in my case) will pay off. (Min-Max, preferably with Alpha-Beta pruning)
So, after you have a more or less quick way of finding the obvious moves and when you can search some plies (I would say that 3 is the minimum, but okay, 2 is more or less fine for students), you should be able to determine what characteristics will lead to the best play. For instance: can you encourage your bot to play Tetrisses, stack first to make big combo's, prevent it from playing holes? How to prevent it from having multiple deep 'tunnels', ect...
Imho, only after you have achieved this, you start being concerned about paths for things like T-spins, and other hole filling fields.
Just my 2cts