| Package | com.lookbackon.AI.searching |
| Class | public class RandomWalk |
| Inheritance | RandomWalk SearchingBase AbstractProcess Object |
| Method | Defined By | ||
|---|---|---|---|
RandomWalk(gamePosition:PositionVO)
About RandomWalkAI(瞎走)
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. | RandomWalk | ||
![]() | SearchingBase | ||
[override] | RandomWalk | ||
![]() | 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] | RandomWalk | ||
![]() | 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 | |
| RandomWalk | () | Constructor |
public function RandomWalk(gamePosition:PositionVO)About RandomWalkAI(瞎走) 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 |
| doEvaluation | () | method |
override public function doEvaluation(conductVO:ConductVO, gamePosition:PositionVO):intParameters
conductVO:ConductVO | |
gamePosition:PositionVO |
int |
| run | () | method |
override public function run():void