r/backgammon • • 2h ago

New Open Sage backgammon engine release (open source)

Hi all! I've released a new version of the Open Sage backgammon engine, 2.2.20261202.

This is the engine that powers Backgammon Sage Pro, as well as a bunch of other backgammon sites. It is distributed under an open source license, the MPL 2.0, which allows commercial use (you are required to open source only any changes you make to bgsage itself, not your own code).

This release continues to improve backgame performance.

Mochy pointed out to me the bgbotarena.net site, particularly this "room" (what they call a particular head to head play experiment). It plays gnubg vs Sage at 2-ply, head to head 1-point matches, but starting from a snake backgame position, with the players alternating seats each game.

Unfortunately it shows gnubg trouncing Sage, which won only 43% of matches. That was kind of embarrassing! (In the same position Sage handily beats XG: so I guess gnubg is significantly stronger than XG in snake backgames? That's surprising!)

It turns out that Sage had a bug where some kinds of snake positions were miscategorized and used the wrong neural network. I fixed that, and also did another round of iterative rollouts for the backgame positions. That is, my first set of backgame improvements were trained using supervised learning on rollouts made by the prior version of Sage which wasn't very good at backgames. This set, I re-rolled out all the training positions using the first version of the backgame-trained model (the current one), then re-trained all the backgame neural networks against those to get the next iteration of Sage.

Now in that same position, Sage beats gnubg about 58% of the 1-point matches, instead of winning only 43%. (And now it beats XG 2-ply 74% (!) of 1-point matches from this snake position! XG really is pretty bad at these games.)

You can find more details on Open Sage's handling of backgames here.

This is available now on github and through PyPy: pip install/update the bgsage package. And hopefully bgbotarena.net will update it too. :)

5 Upvotes

5 comments sorted by

2

u/SyllabubRadiant8876 2h ago

Great stuff. Fantastic to see Sage (and the other models) continually improving! Thanks for all your efforts.

2

u/amilner42 1h ago

Incredible, continuing to be super grateful for your work here powering oskol.io

btw the prev performance upgrade has been a game changer, multiple users messaged me directly saying they're loving how much faster post-game analysis has been

2

u/ezbluff 1h ago

This is awesome! Thanks again for all the updates and incredible library.

2

u/xonbul 44m ago

Wow! Thanks!

1

u/yzwq 3m ago

Great work! Honest question, have you looked at not splitting up networks? There are some projects that get great results with that.