- Updated Thursday, February 25th 2016 @ 02:09:28
One hard part about this challenge is making your heuristic function good. There's two parts to this: deciding what features of the board to evaluate and deciding how much to weight each feature.
I think deciding what features of the board to evaluate is mostly up to the programmer's creativity. Basically some examples of things are like the max height of the board, how many holes there are, whether there is a t-spin hole in the field or not, etc.
The other side of this is tuning your heuristic (like figuring out how much a t-spin hole is "worth" or how much penalty a hole is worth relative to other features). If you are hand-tuning your heuristic, you might want to consider trying out some heuristic tuning algorithms. Here's a resource that I found useful: Automated Tuning
I think hand-tuning parameters is very painful... (haha). So I would strongly suggest looking into some algorithms for automated tuning. I think the most popular are genetic algorithms which are discussed a little bit in the wiki page. I'm currently using a genetic algorithm to tune my bot. I currently have my bot play against itself using the Block Battle engine, and my bot accepts command line arguments for the parameters.
I just wanted to make this post for you guys who are hand-tuning your heuristics. In general I think hand-tuning is fairly effective but it is very easy to get biased by the results against other players. You might upload a new version, see it loses 4 times, then think it's not good when it might be an improvement still. Maybe consider trying this out if you are hand tuning your values :)
- Updated Friday, February 26th 2016 @ 13:00:09
Hi, I'm currently using a meta-heuristics similar to genetic algorithm too :):)
but I suffer from the solution does not converge. In this game, the winner depends also on the "compatibility of bots" and "luck". It seems like to tune the heuristic of rock-paper-scissors.
Perhaps it is a bug in my program. I'll try other simple meta-heuristics, such as local search.
- Updated Saturday, February 27th 2016 @ 04:32:48
I thought this article was interesting: StockFish Automated Tuning
It seems like a simple algorithm to implement and maybe it's worth trying it out to see if you can get some further improvements. The advantage of it seems to be that you start with a set of parameter values you know is good and it begins tuning from there instead of starting from just a random set of parameters.
I see what you are saying with the not converging problem. I basically have the same problem. In the past week I have been tweaking my algorithm in little ways to see if I can get an improvement.
Maybe the key is to try to come up with a new insight/variable about the game that you can use to get an advantage.
- Updated Sunday, February 28th 2016 @ 18:27:07
Thank you for introduce the nice method :)
I used the stockfish's tuning method for a new my bot. It has been at least slightly improved. (Maybe...
>Maybe the key is to try to come up with a new insight/variable about the game that you can use to get an advantage. If my bot could learn such knowledge by machine learning, how much I would be happy.
- Created Wednesday, March 9th 2016 @ 04:43:43
One thing that I'm very curious about, is how do you formulate actions to which heuristics are applied? I'm a bit stuck on how to formulate the problem and wonder how you tackle it. Do you look at your current piece (say 'L'), and then calculate all the possible ending positions you can accomplish and associate a heuristic with those? Or is it more of a base level where you evaluate actions like 'rotate piece right' with heuristics that then form a playing entity? Also, on a random side note, are teams allowed? I'm hoping to apply my Machine Learning knowledge to this domain.
Thanks for any info!
- Updated Friday, March 11th 2016 @ 03:04:29
For me I look at the piece, calculate all the possible ending positions, and then evaluate the score of that position with my heuristic. And I choose to take the move with the best score. My scoring function looks at features on the board and gives points based on these. Some examples include number of holes or whether a t-spin opportunity exists.
I think teams are allowed, but I'm not sure.
I would be curious to see what sort of machine learning techniques you bring to the competition! :)