Code a la Mode - Feedback & Strategies

Playing games in batches and then processing the results sequentially seems unfair - the results would depend on the order in which the results are processed.

I propose something like this…

  1. the matchmaker chooses X “interesting” games based on the currently known scores
  2. the X games are played
  3. for each game a new score is calculated based on the scores used by the matchmaker
  4. the scores are updated using the average of the new scores

I am sure a bayesian could come up with a much smarter update rule that took into account the entire batch of predictions+results at once.

2 Likes

Even better would be to use TrueSkill v2 which has a batch computation mode which recalculates the score using the entire history of matches.

The history of matches is regularly truncated every day for storage/efficiency reasons, and TrueSkill v2 would take significantly more computation. It doesn’t seem like a viable option for CG. Online updates to ranking works well enough when properly calibrated and enough quality matches are fed into it.

Also, there is no real need for sequential ordering of matches for TrueSkill, as it does not even address the problem of matchmaking at all. As long as the rating updates are serialized, and that you do not buffer too much so the matchmaking can do a decent job and maintain a reasonable rating gap between opponents, it will work well enough. Halite’s backend codebase, which is open source and based on Google’s AI challenge, has a working implementation despite some unrelated flaws.

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 :smiley:

Thanks to csj and Matteh and Codingame

4 Likes

Seriously ? Sound effect and music ? I didn’t heard that during contest !

Sounds added in the video :smiley:

1 Like

Thanks all for your responses. i was having similar questions and your answers were helpful to me.