Janzert / AEI

The Arimaa Engine Interface provides a standard method to communicate and control an Arimaa bot.
http://arimaa.janzert.com/aei/
Other
22 stars 5 forks source link

Difference between board and x88board? #7

Closed KarelPeeters closed 2 years ago

KarelPeeters commented 2 years ago

I noticed that there are two Position classes, both seem pretty similar which mostly matching constructor and method signatures.

Do they implement slightly different rules? Is one faster than the other?

There is this quote in the readme:

the Arimaa position representation (as bitboards in board.py and x88 in x88board.py)

But I can't figure out what x88 means.

Janzert commented 2 years ago

They are meant to have the same external interface (although I'm not sure without checking if this is actually tested and x88board.py may have suffered from bitrot). They are just implemented using two different internal board representations. board.py uses a bitboard representation and x88board.py using a x88 (or 0x88) representation. The bitboard representation is quite a bit faster and is the one actually used by everything else. But it is a bit more awkward to implement, particularly in python. I used both of them to cross check that I was getting accurate results when implementing.

You can read more about the basics of both on the chess programming wiki, bitboards and 0x88.

KarelPeeters commented 2 years ago

I see, thanks a lot for explaining!