Libsaki
Core library of Pancake Mahjong
Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
saki::Ai Class Reference

#include <ai.h>

Inheritance diagram for saki::Ai:
Inheritance graph
[legend]
Collaboration diagram for saki::Ai:
Collaboration graph
[legend]

Classes

class  Limits
 

Public Member Functions

 Ai (const Ai &copy)=delete
 
Aioperator= (const Ai &assign)=delete
 
Decision decide (const TableView &view) final
 

Static Public Member Functions

static std::unique_ptr< Aicreate (Girl::Id id)
 
static Action thinkStdDrawnAttack (const TableView &view)
 

Protected Member Functions

Action maxHappy (const TableView &view)
 
virtual Action thinkIrs (const TableView &view)
 
virtual Action think (const TableView &view, Limits &limits)
 
Action placeHolder (const TableView &view)
 
void antiHatsumi (const TableView &view, Limits &limits)
 
void antiToyone (const TableView &view, Limits &limits)
 
Action thinkChoices (const TableView &view, Limits &limits)
 
Action thinkDrawn (const TableView &view, Limits &limits)
 
Action thinkDrawnAggress (const TableView &view, Limits &limits)
 
Action thinkDrawnAttack (const TableView &view, Limits &limits)
 
Action thinkDrawnDefend (const TableView &view, Limits &limits, const util::Stactor< Who, 3 > &threats)
 
Action thinkBark (const TableView &view, Limits &limits)
 
Action thinkBarkAttack (const TableView &view, Limits &limits)
 
Action thinkBarkDefend (const TableView &view, Limits &limits, const util::Stactor< Who, 3 > &threats)
 
Action thinkAttackStep (const TableView &view, const util::Range< Action > &outs)
 
Action thinkAttackEff (const TableView &view, const util::Range< Action > &outs)
 
Action thinkDefendChance (const TableView &view, const util::Range< Action > &outs, const util::Stactor< Who, 3 > &threats)
 
bool afraid (const TableView &view, util::Stactor< Who, 3 > &threats)
 
bool testRiichi (const TableView &view, Limits &limits, Action &riichi)
 
int chance (const TableView &view, Who tar, T34 t)
 
int ruleChance (const TableView &view, Who tar, T34 t)
 
int logicChance (const TableView &view, T34 t)
 
util::Stactor< Action, 14 > listOuts (const TableView &view, const Limits &limits)
 
util::Stactor< Action, 14 > listRiichisAsOut (const Hand &hand, const Choices::ModeDrawn &mode, const Limits &limits)
 
util::Stactor< Action, 44 > listCp (const Hand &hand, const Choices::ModeBark &mode, const T37 &pick, bool noChii=false)
 

Detailed Description

should give same output when given same input need to be reproducible for implementing prediction-related skills

Member Function Documentation

◆ testRiichi()

bool saki::Ai::testRiichi ( const TableView view,
Limits limits,
Action riichi 
)
protected
Parameters
riichiwill be set the best choice iff riichi is in choices
Returns
true iff riichi good for this situation

The documentation for this class was generated from the following files: