| Package | com.lookbackon.AI.searching |
| Class | public class MinMax |
| Inheritance | MinMax SearchingBase AbstractProcess Object |
| Method | Defined By | ||
|---|---|---|---|
MinMax(gamePosition:PositionVO)
if(game over in current board position)
return winner
children = all legal moves for player from this board
if(max's turn)
return maximal score of calling minimax on all the children
else (min's turn)
return minimal score of calling minimax on all the children
| MinMax | ||
![]() | SearchingBase | ||
[override] | MinMax | ||
![]() | generateMoves(pieces:Vector.<ChessPiece>):Vector.<ConductVO>
This function generates all possible moves and stores them in the vector.
It returns the vector of the legal moves.
While is checking,defend moves with high priority.
| SearchingBase | |
![]() |
Obviously,the struct move must contain all information necessary to support this operations.
As always,the structures are passed by reference,
in this case it is not only a speed question:
the position will be modified by this functions.
| SearchingBase | |
![]() | noneMove():int | SearchingBase | |
run():void [override] | MinMax | ||
![]() | runAndManage(allocation:int):void | AbstractProcess | |
![]() | terminate():void | AbstractProcess | |
![]() | unmakeMove(conductVO:ConductVO):void
Unmake previous move,for all kinds of searching tree algorithms. | SearchingBase | |
![]() | willNoneMove(gamePosition:PositionVO):Boolean | SearchingBase | |
![]() | yield():void | AbstractProcess | |
| MinMax | () | Constructor |
public function MinMax(gamePosition:PositionVO)if(game over in current board position) return winner children = all legal moves for player from this board if(max's turn) return maximal score of calling minimax on all the children else (min's turn) return minimal score of calling minimax on all the children
ParametersgamePosition:PositionVO |
See also
| doEvaluation | () | method |
override public function doEvaluation(conductVO:ConductVO, gamePosition:PositionVO):intParameters
conductVO:ConductVO | |
gamePosition:PositionVO |
int |
| run | () | method |
override public function run():void