Hi, this challenge was very fun, good job !
My strategy is built on many many many parameters, and in my last submit, I changed just one which finally was not a good idea. The main questions were how to build colors to maximize the points potential, and when attack the opponent player.
Deep exploration here is only necessary to build the colors chain because deciding attack strategy with deep search would have made informations collect very complicated due to rules of the game and lack of data given about opponent actions and game status. So attack decision will depend only on points potential on the self current turn and the enemy next turn.
Also, I think game evaluation here is very important because potential color chains may depends on every move even those made in the beginning. The main criterias will be to keep an open game to maintain a lot of possibility for moves, which include maintaining space, playing in the center of the board, avoiding color closing when there is only on or two, and if possible, verifying the chain connections, which consists in evaluating the potential four or more colors groups. The other reason I think evaluation is very important is that every move can close opportunities in the future, even in the far end of the game.
So the key here will be knowing if a move is closing the game, opening it, and if it is building 3 colors groups connected with potential 4 or more colors groups.
- The first part of the game, I used DFS, only on centered columns :
- Number of turns for this first part : 8,
- Deep : 4
- First column : 1
- Last column +1 : 5 (so last column is 4)
- Evaluation : f1 * points + f2 * cumul-points + f3 * eval_position with f1, f2, f3 = 0, 1.2, 1
- I tried to go deeper than 4 with a random rule based on proba decreasing with deep to not open some moves in exploration, but it was not very efficient, so I didnāt keep it (I didnāt had time to learn and implement MCTS) :
- Probability to explore bad moves : 200 / ( deep * 1000)
- Probability to explore good moves : 2000 / ( deep * 100)
I thought here that randomly eliminate moves was not a good idea for me for many reasons :
- Every single move can potentially be a good move for the future destruct combo
- Every move is strongly different from another, and can be very good or very bad in the far future
- There is not a lot of possible moves (22) so eliminate one is very risky.
- deep evaluation is mainly present in the game construction itself (like destruct chain), so time is better used in game evaluation of every early move than gaining deep in some random future move.
- tree search algos is not the best skill I can improve in limited time
- The second part of the game (after the 8th round), I used DFS too, but on all columns :
- deep : 3
- evaluation : same as before (see next parts for detail)
-
Each turn, I looked at the best enemy move in points on deep 1 and deep 2
-
Each turn I looked at my best move in points, and decided to strike based on some criterias :
- Normal strike : points > 2300
- Skull strike (if there are too much skulls) : points > 420 if at least 40 skulls
- Space strike (if there is no more space : points > 420 if space left < 30 free cells
- Fatal strike (chance to kill the enemy) if points >= (enemy space +1)* 70 : on / off
- Defense strike : if enemy points > 2300 this move or next, and my points > 700
- To build the game with chains of color :
- Keep a free cell next to colors with bonus given : +10 (1 color alone) +50 (2 same colors) +150 (3 same colors)
and with malus if no free cell : -5 (1 color alone) -2(2 same) -1(3 same)
- multiply this bonus + malus with a factor depending on number and proximity of the same colors in the AB colors queue
- Adding a bonus for 3 same color groups to avoid bad moves destroying only 4 colors : +150
To compact same colors together :
- Align colors on specific column: malus of - 4 * (color - column) if color - column > 1
(factor -8 here in last submit was the error because I only tested it in IDE and -4 was my best value balance during all my submits :(()
- Add a malus for height : -2 * height
- Malus if color is not on center : -30 * distance from center
- Malus if a same color are in too far columns : -2 * width since witdh > 2
- Verifying combo, comparing the 3 colors above each group of 3 with bottom, left and right colors : +50 for each different color found making a group of 4 or more if the group of 3 is destroyed
- other stuff :
- Malus to kill skulls based on height of skull : -10 * height * height
- Malus to preserve space : -100 since space < 24
- and many other things I finally didnāt keep,ā¦
So, last 2 days were aboutā¦ how combine all that ? That was my big problemā¦
My last error was changing one parameter at 7:56 PM in my last submission, although I had found a nice balance during all these days. Too curious last 4 minutes (rank 63).
To improve my parameters choice, I think I would have simulate them with a local simulator, because the color construction is very independent from the play strategy with the opponent. I didnāt got the idea but in fact I think that it is the best thing to do in this type of game.
This challenge was very interesting. The league system is a very good idea. Thanks to all for your good job.