halma/src/Game/Halma/AI/Ignorant.hs
Use guards Open
Open
ignorantFixedDepth n opts team board =
if n <= 0 then
rateTeam team board
else if hasFinished board team then
WinIn 0
- Read upRead up
- Exclude checks
Found
ignorantFixedDepth n opts team board
= if n <= 0 then rateTeam team board else
if hasFinished board team then WinIn 0 else
beingSomewhatGreedy (rateTeam team board) $
maximum $
map (ignorantFixedDepth (n - 1) opts team . outcome board) $
allLegalMoves opts board team
Perhaps
ignorantFixedDepth n opts team board
| n <= 0 = rateTeam team board
| hasFinished board team = WinIn 0
| otherwise =
beingSomewhatGreedy (rateTeam team board) $
maximum $
map (ignorantFixedDepth (n - 1) opts team . outcome board) $
allLegalMoves opts board team