pimidrez wrote:Gracias Daniel! se entendio a la perfeccion... dejo unas preguntas más para quien me pueda seguir ayudando:
ENGLISH
1) When I call for the first time this function:
Public Function AlphaBeta(ByVal depth As Integer, ByVal alpha As Integer, ByVal beta As Integer, ByVal whiteToMove As Boolean) As Integer
What value should I give to the variables depth,alpha,beta?? or how do I get it??
alpha and beta are the search window.
depth is the number of plies you want to search.
2)The next portion of code, what does it exactly? Just take part in the final of the search or before in the beginning?
If (depth <= 0) Then
Return Me.Game.evaluate(whiteToMove)
End If
When your engine is done, you will really have a call to quiesce() here, but for starters you can just return evaluate().
The idea is that you have searched all the plies and it is time to return, but return what?
A zero ply search is approximately an evaluation (though a real search of zero plies will really make sure that all beneficial exchanges have been examined).
**************************************************
**************************************************
ESPAÑOL
1) Cuando se llama por primera vez a la funcion:
Public Function AlphaBeta(ByVal depth As Integer, ByVal alpha As Integer, ByVal beta As Integer, ByVal whiteToMove As Boolean) As Integer
Con que valor entra la variable DEPTH??...es decir yo llamo a la funcion, que valores le tengo que dar a cada una de las variables: DEPTH,ALPHA,BETA??? o como los obtengo??
2) La siguiente porción del codigo que hace exactamente? solo tomar parte en el principio o al final de cada busqueda?
If (depth <= 0) Then
Return Me.Game.evaluate(whiteToMove)
End If
Gracias de nuevo!