Hi everybody
I liked this contest very much. Coop is a very good idea. A lot of pleasure to prepare all those dessert plates.
I finished #58 (legend) with combining some strategies :
- Preparation mode : priority on preparing all ingredient needed for all visible commands
- Collecting mode : priority on collecting ingredients when ready, else preparing them
- Interruption mode : Prepare first but collect if all ingredients are ready
To select the mode, many criteria :
- Select the best command : the one with the best ratio points / number of moves (evaluated), when enough moves are possible until the end of the round
- On start of a round, always prepare
- On end of a round, always collect
I couldn’t implement the idea to adapt the mode on my partner play. I think I’ll test that feature on multi
Movements are bruteforced on all combinations of 2 items collected, all items included (plates, partially finished plates, …) and the choice is made on the cell which costs the least number of moves, with a preference when the other player can access to the most number of cells.
To evaluate the cost in moves to prepare a command, I take the distances from all cells where I have to go, from my actual position, doing the sum of all moves needed for all those deplacements and all actions to do to prepare the full plate, included timer waiting for oven, and one last action to ring the bell. This total of moves is divided by a constant value (near 2).
When my partner is blocking me, if the distance to a cell is more than a constant value (near 16), I go to my partner, waiting him to free the way. I’m waiting for only two turns after what this feature is desactivated for three more turns.
Sometimes, to drop one ingredient, I chose to use a plate if that plate is compatible with a visible command. After this action, the best command may change because having a plate with more desserts reduces the number of moves to finish it.
I have a micro gestion of the oven to know what to do, and I count on my partner to open it on a lot of criteria : distance, his hands are empty, mine are empty, timer, …
I calculate time left to get the cooked dessert in the oven, and stop what I’m doing if my partner doesn’t fit the conditions to get it. Watching replays, I noticed that wanting to get the croissant or tart just when the cooking timer reaches zero, didn’t let me the time to do other things. So I decided that some actions will never be interrupted, like cutting strawberries if I got them in hands, or get dough if I need some. And if oven rings, I’ll take the content later.
When oven rings and I have something in my hands, I have to decide if I drop it immediately or if I drop it near the oven. I prefer drop everything near the oven to have it near me then, but sometimes, there is no more place. So I try to anticipate this situation. And there I lack a simulator…
To drop something, I use the nearest free table and prefer one which is near center of the kitchen.
This game was great. Nice graphics, nice concept, nice sound effects, nice music
Thanks to csj and Matteh and Codingame