Infinite Loop in Boop and Strange Opening?

Forum rules
Please DO NOT POST BUGS on this forum. Please report (and vote) bugs on : https://boardgamearena.com/bugs
Post Reply
AlphaBoop
Posts: 1
Joined: 15 February 2024, 18:30

Infinite Loop in Boop and Strange Opening?

Post by AlphaBoop »

When I first trained AlphaBoop (an AlphaZero model of Boop), I did notice a problem.

In the later stages of training, the AI would become much slower. Granted, this is to be expected because as the AI grew stronger, the number of turns in their self-played games grew.

But, the increased training time was still abnormal. When calculating ELO, different iterations of the AI had to fight each other, and on very rare occasions, they appeared to be stuck.

There are instances when I pit two AI agents against each other, and they get trapped in an infinite loop.

In order to study the effects of infinite loops, I retrained AlphaZero from scratch and asserted a new rule:
If a board state occurs three times, the game is a draw.
To clarify, my definition of a board state isn't merely what you see on a 6x6 board. It includes the number of kittens and cats that each player has in their pool.

For instance, you can have a completely blank board where each player has 8 Kittens. That is simply the start of the game.

However, you can also have a completely blank board where each player has 3 Cats and 5 Kittens. Although the board is identical, I am treating this as a different "board state".

Below is a graph that illustrates the rate of draws over the iterations of AlphaBoop's training, as you can see, this explains why my original training was slowing down because once I factored in this rule, the AI no longer gets struck anymore at the advanced stages of learning.

Image

In the beginning, the rate of draws in the early iterations was simply 0% of the time. More accurately, in over 3000 self-played games, none of them resulted in a draw.

Then, gradually, you see a somewhat linear trend of growth as the rate of draws grew over time as the AI got stronger. The last recorded iteration marks the highest rate of draws which is 0.87% of the games in that iteration were drawn.

In addition, by asserting this new rule on "draws", the ELO spiked higher than my original training by a significant amount right at the starting iterations.

I suspect the reason is because the infinite loops dilute the exploration of the AI. It would be like exploring a forest, but you occasionally walk circles around a tree like an idiot - wasting your time and energy. By defining a hard stopping point for repeated board states, the AI likely gets to more efficiently conduct its search.

Interestingly, some of the moves that this AI (with the draw rule established) thinks are good are not the same as the original implementation.

For example, in response to C4:

🟦️ 🟦️ 🟦️ 🟦️ 🟦️ 🟦️
🟦️ 🟦️ 🟦️ 🟦️ 🟦️ 🟦️
🟦️ 🟦️ 🐈‍⬛ 🟦️ 🟦️ 🟦️
🟦️ 🟦️ 🟦️ 🟦️ 🟦️ 🟦️
🟦️ 🟦️ 🟦️ 🟦️ 🟦️ 🟦️
🟦️ 🟦️ 🟦️ 🟦️ 🟦️ 🟦

This AI thinks there are two good moves: B2 and D3. D3 is very standard, yet B2 seems unusual. Originally, the AI thought D3 was THE best move.

🟦️ 🟦️ 🟦️ 🟦️ 🟦️ 🟦️
🟦️ 🟦️ 🟦️ 🟦️ 🟦️ 🟦️
🟦️ 🟦️ 🐈‍⬛ 🟦️ 🟦️ 🟦️
🟦️ 🟦️ 🟦️ 🟦️ 🟦️ 🟦️
🟦️ 🐈 🟦️ 🟦️ 🟦️ 🟦️
🟦️ 🟦️ 🟦️ 🟦️ 🟦️ 🟦

Interestingly, when I trained Gekitai (the "Young Player Variant" of Boop), playing B2 was considered the best opening response to C4 according to the AI.

When I crank up the Number of Simulations to 16,000, B2 and D3 are rated as comparable. When I crank it up to 64,000, suddenly B2 became favored more.

So... if any of you are brave enough to experiment B2 as a response to C4, be my guest. Maybe my AI is just stupid.

In response to B2, the AI says there are four moves it would consider: D4 (highest rated), A3, B4, and C3. The AI would play D4 here:

🟦️ 🟦️ 🟦️ 🟦️ 🟦️ 🟦️
🟦️ 🟦️ 🟦️ 🟦️ 🟦️ 🟦️
🟦️ 🐈‍⬛ 🟦️ 🐈‍⬛ 🟦️ 🟦️
🟦️ 🟦️ 🟦️ 🟦️ 🟦️ 🟦️
🟦️ 🐈 🟦️ 🟦️ 🟦️ 🟦️
🟦️ 🟦️ 🟦️ 🟦️ 🟦️ 🟦
User avatar
Normal1
Posts: 1
Joined: 20 October 2011, 03:50

Re: Infinite Loop in Boop and Strange Opening?

Post by Normal1 »

The best human "boop." player (BoopMaster) does play this style of opening so there is almost certainly something to it. I believe BoopMaster would generally play E5 against C4, which I think is symmetrically identical to B2.
User avatar
ahrnge
Posts: 22
Joined: 14 July 2022, 18:08

Re: Infinite Loop in Boop and Strange Opening?

Post by ahrnge »

Fascinating stuff. I would love to see some of the games/positions in which Alphaboop repeats moves against itself.
Kaepo
Posts: 44
Joined: 07 March 2023, 12:59

Re: Infinite Loop in Boop and Strange Opening?

Post by Kaepo »

I read that post way too late (thanks ahrnge for notifying me it!), it's quite exciting stuff! I love the idea that there are so many things that still need to be analyzed and discovered, despite being a "simple" game on a mere 6x6 board.

This b2 answer to c4 will be exciting to think about. Thanks for posting it!
Normal1 wrote: 07 March 2025, 03:50 The best human "boop." player (BoopMaster) does play this style of opening so there is almost certainly something to it. I believe BoopMaster would generally play E5 against C4, which I think is symmetrically identical to B2.
Do you mean the best "human" boop. player? ;)
MarianNyah
Posts: 5
Joined: 08 September 2025, 07:16

Re: Infinite Loop in Boop and Strange Opening?

Post by MarianNyah »

Super late to the discussion. I forgot my login details :shock:

Over the past few months I've been training my own network that plays boop. Training is more similar to what Lc0 does than AlphaZero, the arch closer to NNUE than ResNet, and a few changes to policy targets.

I was drawn to some of your findings here. My AI does run into loops, especially with the 1. b4 c4 line. There's this point where it just steers toward a repetitive boop along the corner. During training, I find that draws occur around 1-2% of the time depending on how much exploration the AI does during the opening.

Interesting how your AI wants to open with 1. c4 b2. Mine never found that line as it one-sidedly prefers the 1... d3 line. Curious, I ran 1. c4 b2 on my AI. It recommends 3 possible responses: d4, b4, and c3. All other moves have low visit counts, but judging by the score, they seem playable.

The d4 line leads to an immediate fight for the center to get cats via 3 in a row in a surprisingly forcing manner (e.g. 1. c4 b2 2. d4 d3 3. a4 e3 4. e6 a1 - you end up with 3 cats each player, equal material, and kittens on a4 and e3). Unlike other responses to 1. c4, it denies the first player the chance to go for a tempo move after getting cats by booping kittens off the board with b2/e2/b5/e5, a move that very often leads to a quick material and positional advantage for the player that boops. The follow-up by gray is also quite varied with either d3 or d4 kitten or cat. Very fascinating.
Post Reply

Return to “boop.”