KYLChiu / sporkfish

Chess engine in Python
MIT License
5 stars 0 forks source link

[Feature] CompositeTablebase #137

Open KYLChiu opened 5 months ago

KYLChiu commented 5 months ago

After the work on #105 - second part is to enable Lila tablebases ideally through a composite interface. The idea should be similar to what you've designed before, just in different classes.

  1. Change the current EndgameTablebase class into an abstract base class. The query function becomes an @abstractmethod - see Evaluator in the evaluator/ for examples.

  2. Move all the current local logic into LocalTablebase. This should inherit from EndgameTablebase and provide the query function. See Pesto in evaluator/ for an example.

  3. Add a class called CompositeTablebase, inheriting from EndgameTablebase which does the querying of local and Lila through the underlying class query functions. Bonus points for making it configurable.

Ideally these should live in the same folder, so if you could refactor the files into endgame_tablebase/ folder that would be great.