Previous: A general interface for AI predictors, Up: Machine learning with tarot [Contents][Index]
libtarot has an API endpoint to run a game against the AI.
A game, where all players but the specific dealt player play using the AI.
Allocate and free a new game against the AI. The fuzzy variant uses an AI that will incorporate a random evaluation in all moves. If fuzziness is set to 0, then no random evaluation will be considered. If fuzziness is set to 1, then all moves will be chosen at random. If ai is ‘NULL’, then a default AI will be used.
This is an easy way to change the difficulty of the game.
Copy source to dest (optionally changing the human player to who).
Allocate and return a copy of source.
Get the game as known by the human player in solo. The second function allocates the results.
Set up the solo game for nplayers players (and withcall if there is a call). The random-suffixed function will select an interesting game at random. Otherwise, you can specify which player to play, the individual owners for each card (an array of size nowners, which should be 78), the expected taker and call if relevant.
This function returns an error code. The only error that could happen is a petit sec. There cannot be any duplicaté-related ticking bomb as seen in the duplicaté section, so nothing bad to fear here.
Try and add event to game. This function may only fail if event is not correct for the human player.
Previous: A general interface for AI predictors, Up: Machine learning with tarot [Contents][Index]