[Community Puzzle] Volcanoes

https://www.codingame.com/multiplayer/bot-programming/volcanoes

Send your feedback or ask for help here!

Created by @skotz,validated by @Trilusion,@FDA44 and @Dartisan.
If you have any issues, feel free to ping them.

1 Like

Iā€™ve been trying to figure out how a strictly random move bot can beat a directed bot so readily. And after reviewing the referee and board .java ā€¦ I think itā€™s because java is ensuring an even distribution. Meaning that a cluster has a high probability of blocking the shorter paths. Where Iā€™m enticed to ā€˜battle it outā€™, my bot fails, where the random bot naturally finds empty positions by the random number distribution. Iā€™m not sure if line 332 of board.java if (growthMoves && expandMoves & captureMoves && maxGrowthValue >= Settings.MaxVolcanoLevel) { is even correct. It probably doesnā€™t even get called, but it looks suspect to me anyways. As for how to combat a random move botā€¦well thatā€™s another matter entirely. Moving to either enhance path options or blocking in 2 or 3 steps from desired path or enemy path to create a cluster would seem the logical conclusion. But with so many options of algorithms, Iā€™m kinda stumped - because if you block one the random bot will naturally find the other 2 for multiple junctions so a ā€˜best guessā€™ is so close to random imho Iā€™m finding it hard to be worth the time. Although I appreciate the 100ms. tx.

Itā€™s important to take eruptions into account as they will automatically expand your territory. Thatā€™s why itā€™s rarely a good idea to play on tiles directly adjacent to an already-owned tile.

Hi!
I encountered a weird behaviour, where level 4 volcano gets ā€œdeleveledā€ to level 3, but remains unplayable.
Screenshot from 2021-10-01 10-18-00

@Sandell0 Yeah, that looks unintentional. Do you have a link to the specific game?

Most of my games against burger4d are like this:

@Sandell0 Iā€™ve applied a fix. Could you test and let me know if it happens again?

1 Like

Seems fixed to me. At least I canā€™t reproduce it anymore. :slight_smile:

2 Likes

Sorry if I duplicate but I donā€™t know the hell where my first post landed!

Hi skotz,
I have been trying a few test case to better understand the eruption rule. Here is an example. Player 1 plays N28 then always N29. Player 2 plays N25 then always N26.

At frame 8 it is time for grow, and the result is strange to me. It is not symetric anymore and some tiles close to eruption have grown by 2 instead of one. Tell me what you think.

2 Likes

@EricSMSO Yeah that looks like a bug. Iā€™ll take a look.

1 Like

I believe I have a fix, but the contribution uploader has been down for at least several hours now. Iā€™ll try again tomorrow.

I guess it is in processEruptions(). When you process deltas, you should work with a copy of Tiles instead of testing and modifying in place.
CU

@EricSMSO The change should be out there now. Let me know if you run into any more problems.

The issue was with how I was handing dormant volcanoes. It was possible under certain conditions for a volcano to double erupt before being marked dormant.

Thanks skotz,
Hope Iā€™ll manage to develop a better botā€¦

Hi - nice puzzle. I was looking at your github entry. Is there a way to run the script to just produce outputs from inputs ? I know this is probably a dumb question (warning-iā€™m just a hobby coder), but I just want to execute the game locally by feeding it values and getting the resulting game states so I can play with an ML approach.

@picoplankton There are some community tools out there that can run the referee logic locally for this very purpose, but I havenā€™t used any of them personally.

you wouldnā€™t be able to point me at one, would you ? I guess I could write a wrapper myself. The graph is in the input layer.

Iā€™m at no.1 of wood league 2 with a score of 25.7. Iā€™m so close to beating that second boss, but I canā€™t figure out what the AI is doingā€¦ ever so slightly better than me :wink:

Youā€™d probably get a better answer by just asking in the global chat to see what people are using. Iā€™ve always just used something I wrote myself.

The second bot is using MCTS.