I built an AI that plays Toy Battle, and now it's almost impossible to beat

Forum rules
Please DO NOT POST BUGS on this forum. Please report (and vote) bugs on : https://boardgamearena.com/bugs
Post Reply
zackuzt
Posts: 5
Joined: 04 July 2021, 15:46

I built an AI that plays Toy Battle, and now it's almost impossible to beat

Post by zackuzt »

TL;DR: Trained an AI model to prove Toy Battle is not luck-based. It now consistently beats me and my wife, and I’d love to see how other players fare against it.

Link: https://annazac.com/play

--------

My family and I are huge fans of Toy Battle, and we love it for its simplicity and clever design. I’ve seen a fair amount of criticism about the game being too luck-based, but I’ve always felt that good play makes a big difference irrespective of the luck of the draw.

My day job involves quite a bit of training neural networks, and so I was curious to see if I could train a model for this game, that could give a decent challenge to strong human players using only game state information that would be available to a human player.

Ended up putting more time into this side-project than I initially anticipated, and it’s now reached a point where it consistently beats both me and my wife. Of course, that might say as much about us as it does about the bot, so I’m keen to see how other players fare!

Since this is a test project, I’ve kept things simple: there’s only one map and no special base rules.

If you enjoy Toy Battle, I'd love for you to give it a go and let me know your feedback. I’m especially curious whether stronger human players can spot any consistent weaknesses in the model.

Please try the game at https://annazac.com/play

Image
skillz
Posts: 4
Joined: 30 December 2012, 00:24

Re: I built an AI that plays Toy Battle, and now it's almost impossible to beat

Post by skillz »

This looks awesome! I love the little character abilities, nice work!

One note I saw in my game was that the board abilities did not seem to activate for me. I put a 1 down where I should draw two cards and then get to bring a tile back and it didnt do anything after I drew two cards. It went back to AIs turn. Looking forward to hearing about updates and will happily playtest for you.

Skillz
zackuzt
Posts: 5
Joined: 04 July 2021, 15:46

Re: I built an AI that plays Toy Battle, and now it's almost impossible to beat

Post by zackuzt »

skillz wrote: ↑28 September 2026, 13:26 This looks awesome! I love the little character abilities, nice work!

One note I saw in my game was that the board abilities did not seem to activate for me. I put a 1 down where I should draw two cards and then get to bring a tile back and it didnt do anything after I drew two cards. It went back to AIs turn. Looking forward to hearing about updates and will happily playtest for you.

Skillz
It's so nice to hear from you, Skillz! Can't think of a better playtester than the reigning champion :D

I've not implemented the special base effects in the game logic, since this was only a test/hobby project and I'd thought of keeping the rules simple.

Please keep playing and share your feedback. I'm sure you'd be able to spot a lot of glaring weaknesses in the current AI version. :lol:

Would suggest using desktop/tablet for a better experience!
User avatar
Kalkulu
Posts: 1
Joined: 12 January 2026, 14:33

Re: I built an AI that plays Toy Battle, and now it's almost impossible to beat

Post by Kalkulu »

Brilliant Graphics.

Played one game and I must have been lucky, since I am not that strong. Some times it is hard to see which move the AI has just made. But I will surely try again. I think it was no easy win for me. /Kalkulu
zackuzt
Posts: 5
Joined: 04 July 2021, 15:46

Re: I built an AI that plays Toy Battle, and now it's almost impossible to beat

Post by zackuzt »

Kalkulu wrote: ↑28 September 2026, 15:08 Brilliant Graphics.

Played one game and I must have been lucky, since I am not that strong. Some times it is hard to see which move the AI has just made. But I will surely try again. I think it was no easy win for me. /Kalkulu
Thanks a lot for your feedback! I noticed 3 back-to-back wins for you against Dreadlord AI which was a bit of a surprise to me as well.
Turns out some changes I was making in the backend seems to have messed up the AI's responses in the last few hours and it was doing quite a few silly moves. Not to take any credit away from your wins, but do you mind playing a few more games, if its not too much to ask of you?

I've reverted the AI model back to its previous state so it should be playing more sensibly now.

It still succumbs to a continuous Army Push strategy, which is something I hope to be able to fix in the future.
User avatar
Khoradim
Posts: 3
Joined: 29 November 2023, 17:11

Re: I built an AI that plays Toy Battle, and now it's almost impossible to beat

Post by Khoradim »

Played two Games now and noticed a few things.
- the AI goes too much for the base instead of getting points. Even if there is little chance to win with it.
- uses captains too early. Just dropped a captain and a monkey as his first units
- doesn’t like to use ducks. Had several chances to place a duck and score points and didn’t.
- Monkey on my 1 near base is a move it doesn’t like
- doesn’t seem to notice when I’m one point from winning. Could send a monkey on the remaining space but didn’t

So far nice project, the dreadlord is around 200 I would estimate.
User avatar
Khoradim
Posts: 3
Joined: 29 November 2023, 17:11

Re: I built an AI that plays Toy Battle, and now it's almost impossible to beat

Post by Khoradim »

Played some more ; )
It’s way better now, really hard to win if you draw bad.
Opens always with 5 to the left and 1 to the right, if possible.
You can use that pattern, because it doesn’t replace the 1, even if you are right in front of the base. Otherwise really good.
Oh and doesn’t seem to think of a monkey flying to the last needed point.
zackuzt
Posts: 5
Joined: 04 July 2021, 15:46

Re: I built an AI that plays Toy Battle, and now it's almost impossible to beat

Post by zackuzt »

Khoradim wrote: ↑28 September 2026, 22:09 Played some more ; )
It’s way better now, really hard to win if you draw bad.
Opens always with 5 to the left and 1 to the right, if possible.
You can use that pattern, because it doesn’t replace the 1, even if you are right in front of the base. Otherwise really good.
Oh and doesn’t seem to think of a monkey flying to the last needed point.
Great feedback! Thanks a lot for sharing your thoughts and helping playtest so thoroughly.

Will explore how to address the gaps you raised. There's a slightly new model available now on the site (if you'd like to try), but i'm not keeping very high hopes on it yet. :oops:
Post Reply

Return to “Toy Battle”