Ludeme/LudiiExampleAI

Request: Alpha-Beta code

unhandyandy opened this issue · 2 comments

Alpha-Beta search is one of the standard AI options in Ludii, but I don't see it in this repo. Rather than asking everyone to reinvent the wheel, why don't you post the code here so we can adapt it to our purposes?

The source code used by the built-in Alpha-Beta agent can actually be found right here in our other LudiiAI repo.

I don't think we want to copy it in its entirety all the way in here though. The primary purpose of this Ludii Example AI repo is to provide relatively easy, straightforward, simple examples that readers can easily digest and build off of. The source code for our built-in Alpha-Beta is... not that simple. It's mostly a bit complicated because I've added a bunch of things that are not actually Alpha-Beta anymore to handle games with more than 2 players. The built-in agent can recognise these games, switch over to Paranoid search for them, and in cases where it completes running an entire search tree and still has time left (i.e. in very simple games / in end-game positions), it will ALSO switch over to running a Max^N search after having completed the Paranoid search.

These extra bells and whistles for handling games with more than 2 players make the code larger, and more difficult to read and work with, than I'd like for this repository of ideally "simple" example AIs. That said, I do agree it would be nice to have some form of Alpha-Beta here. Maybe a simple, stripped down one that only handles 2 players. I don't think I have time to take care of this right now, but I could review and merge a Pull Request if someone else wishes to contribute it :)

Ah thanks! I hadn't noticed the other repo.