[Community Puzzle] Abalone

Coding Games and Programming Challenges to Code Better

Send your feedback or ask for help here!

Created by @DomiKo,validated by @trictrac,@field3 and @VulpesCorsac.
If you have any issues, feel free to ping them.

VBnet default code doesn’t work.

Solution is to use different variable names in the for loop.

League “Wood 2” is of no use : I accessed the league “Wood 1” at my first attempt , with an action chosen randomly in the list of actions ! (but may be I’m very lucky)

you got lucky, my bot does exactly the same

Well, I’ll try the national lottery !

Make your bot generate the numbers. :smiley:

Already tried … doesn’t work !!! :rage: :grinning:

Wow. I’m currently in 4th behind LeRenard, EricSMSO, and trictrac. But I appear to be in this zone where I win every single game against folks lower down the leader board. And I lose every single game against the top 3. I’ve only seen 2 exceptions to this rule in the last 100ish games. It’s like there’s a hard barrier both above me and below me. I feel like most other codingame games, there’s a little bit more mixed results on average than this.

There is clearly levels to this. If your engine is halfway decent it should never lose a single game in classical abalone. This is not a contest for serious engines. Only good for debugging. Having the Belgian daisy starting position would be nice.

I ended up building what might be the first NNUE based engine for Abalone. Does not seem to ever lose a game. Thinking about open sourcing the solution. Is there anyone interested in this?

1 Like

Copy-pasters will be interested. :smiling_face_with_sunglasses:

Write a PM (NNUE architecture, search algorithm, move engine, training). Tell us how to fish …

OK, here is the high-level version.

Steinbeisser is a bitboard engine with a small incremental NNUE. The state is packed into 61-cell occupancy bitboards, plus per-cell occupancy and slot-map style piece bookkeeping so make/unmake stays O(1) and cache-friendly.

Move generation is table-driven. I precompute board geometry, neighbors, line relations, symmetries, and canonical 1/2/3-marble source groups, then test inline and broadside legality mostly with bit operations. That ended up mattering a lot for speed.

Search is iterative deepening alpha-beta/negamax with a transposition table, aspiration windows, null-move pruning, futility pruning, LMR, killer/history/countermove ordering, correction-history style adjustment, and partial move sorting. A lot of the ideas are inspired by Stockfish.

The evaluator is a small incremental NNUE: 122 sparse inputs plus a small dense feature block, feeding a compact 56 → 28 → 1 head. The accumulator is updated incrementally on make/unmake. Using a single core on my MacBook Pro I search at 3M NPS and get to depth 10 in 40 ms.

Fast and reliable playtesting infrastructure is key for development. 5ms per move for 1000 games seems to be good enough for screening candidates. Happy fishing!

3 Likes