src/utils/Checkerboard.js
/** A `weightedSum` is an simple way of defining an heuristic. Every position in the board is 
	assigned a weight, and every possible value is assigned a coefficients (usually player is 1, 
	opponent is -1, else is 0).
	
	Weights have to be in the same order that `coordinates()` enumerates the board's positions. This
	function assumes the weights are normalized and sufficient to cover the whole board.
	*/
A `weightedSum` is an simple way of defining an heuristic. Every position in the board is
assigned a weight, and every possible value is assigned a coefficients (usually player is 1,
opponent is -1, else is 0).

Weights have to be in the same order that `coordinates()` enumerates the board's positions. This
function assumes the weights are normalized and sufficient to cover the whole board.
A ` weightedSum ` is an simple way of defining an heuristic . Every position in the board is assigned a weight and every possible value is assigned a coefficients ( usually player is 1 opponent is - 1 else is 0 ) . Weights have to be in the same order that ` coordinates () ` enumerates the board ' s positions . This function assumes the weights are normalized and sufficient to cover the whole board .
function weightedSum(weights, coefficients) {
		var board = this;
		return this.coordinates().zip(weights).mapApply(function (coord, weight) {
			return coefficients[board.square(coord)] * weight || 0;
		}).sum();
	}
function weightedSum ( weights , coefficients ) { var board = this ; return this . coordinates ( ) . zip ( weights ) . mapApply ( function ( coord , weight ) { return coefficients [ board . square ( coord ) ] * weight || 0 ; } ) . sum ( ) ; }
A `weightedSum` is an simple way of defining an heuristic.
A ` weightedSum ` is an simple way of defining an heuristic .