build/ludorum.js
/** This player's `stateEvaluation(game, player)` runs `simulationCount` simulations and returns
	the average result. It is provided for compatibility, since `evaluatedMoves` does not call it.
	*/
This player's `stateEvaluation(game, player)` runs `simulationCount` simulations and returns
the average result. It is provided for compatibility, since `evaluatedMoves` does not call it.
This player ' s ` stateEvaluation ( game player ) ` runs ` simulationCount ` simulations and returns the average result . It is provided for compatibility since ` evaluatedMoves ` does not call it .
function stateEvaluation(game, player) {
		var resultSum = 0,
			simulationCount = this.simulationCount,
			sim;
		for (var i = 0; i < simulationCount; ++i) {
			sim = this.simulation(game, player);
			resultSum += sim.result[player];
			if (sim.plies < 1) { 
				break;
			}
		}
		return simulationCount > 0 ? resultSum / simulationCount : 0;
	}
function stateEvaluation ( game , player ) { var resultSum = 0 , simulationCount = this . simulationCount , sim ; for ( var i = 0 ; i < simulationCount ; ++ i ) { sim = this . simulation ( game , player ) ; resultSum += sim . result [ player ] ; if ( sim . plies < 1 ) { break ; } } return simulationCount > 0 ? resultSum / simulationCount : 0 ; }
This player's `stateEvaluation(game, player)` runs `simulationCount` simulations and returns
the average result.
This player ' s ` stateEvaluation ( game player ) ` runs ` simulationCount ` simulations and returns the average result .
// game is final.