You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been writing a Hive AI using this crate and I like the interfaces provided between game representation and engine. However, I'm confused about the purpose of the Player type. This is meant to signal whose turn it is, and it is passed to generate_moves, but either the State or the Move type also needs to encode whose turn it is. Otherwise Move::apply would not have enough information.
The names Computer and Opponent are also confusing because they are not logically linked to say black or white in the game. In order to implement get_winner, you need to know which player is the Computer, but if both sides are being played by the AI, it's not clear what that's supposed to mean.
I think a simpler abstraction would be to require the State to keep track of whose turn it is, don't pass Player to generate_moves, and have get_winner return None, Draw, Victory, SelfDefeat to clarify that it is in terms of which player just played.
The text was updated successfully, but these errors were encountered:
I've been writing a Hive AI using this crate and I like the interfaces provided between game representation and engine. However, I'm confused about the purpose of the Player type. This is meant to signal whose turn it is, and it is passed to generate_moves, but either the State or the Move type also needs to encode whose turn it is. Otherwise Move::apply would not have enough information.
The names Computer and Opponent are also confusing because they are not logically linked to say black or white in the game. In order to implement get_winner, you need to know which player is the Computer, but if both sides are being played by the AI, it's not clear what that's supposed to mean.
I think a simpler abstraction would be to require the State to keep track of whose turn it is, don't pass Player to generate_moves, and have get_winner return None, Draw, Victory, SelfDefeat to clarify that it is in terms of which player just played.
The text was updated successfully, but these errors were encountered: