Beispiel #1
0
void ChessModCfg::toString(void) {
	printf("language: %s\n\tsensationModel: %d\n\tcalcExpValue: %d\n\tsearchdepth: %d\n\trandomness: %d", 
		languageFile, getSensationModel(),getCalcExpValue(), getSearchDepth(), getRandomness());
	/*printf("\tObjects Present (%d)\n", getObjectsCount());
	for(int i=0;i<getObjectsCount();i++)
		printf("\t\t- %s\n", getObject(i));*/
}
Beispiel #2
0
void make_move (Move_t m)
{
	if (isValid_Move (board, m))
  	{
		int score;
		Move_t new_move;
		board = transform_Move (board, m);
		print_board (board);
		print_move (m);
		score = evaluate_Static (board);
		if (score == EVAL_POS_INFTY || score == EVAL_NEG_INFTY)
		{
			print_board (board);
			printf ("The End");
			exit (0);
		}
		display ();
		score = search (board, getSearchDepth(board), &new_move);
		print_move (new_move);
		printf ("Score = %d", score);
		score = evaluate_Static (board);
		if (score == EVAL_POS_INFTY || score == EVAL_NEG_INFTY)
		{
			print_board (board);
			printf ("\nThe End\n");
			exit (0);
		}
		new_move = randomizeMove (board, new_move);
		print_move (new_move);
		board = transform_Move (board, new_move);
		print_board (board);
	  }
}