| Package | com.lookbackon.AI.searching |
| Class | public class PVS |
| Inheritance | PVS SearchingBase AbstractProcess Object |
See also
| Method | Defined By | ||
|---|---|---|---|
PVS(gamePosition:PositionVO, alpha:int, beta:int, depth:int = 2) | PVS | ||
![]() | SearchingBase | ||
![]() |
The evaluation function will return positive values if the position is good for red and negative values.
if the position is bad for red in the MinMax formulation.
Many things could be said about evaluation functions,
for me,the two main objectives in designing a evaluation function are speed and accuracy.
The faster your evaluation function is,the better is.
and the more accurate its evaluation is,the beeter.
Obviously,these two things are somewhat at odds:
an accurate evaluation function probably is slower than a 'quick-and-dirty' one.
The evaluation function I'm taking about here is a heuristic one -not a exact one.
| SearchingBase | |
![]() | 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] | PVS | ||
![]() | 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 | |
| PVS | () | Constructor |
public function PVS(gamePosition:PositionVO, alpha:int, beta:int, depth:int = 2)gamePosition:PositionVO | |
alpha:int (default = NaN) | |
beta:int (default = NaN) | |
depth:int (default = 2) |
| run | () | method |
override public function run():void