The task is to write a heuristic function for the game of Checkers. The function must be written in Java in accordance to the API provided, to work with the given program.
The purpose of the assignment is to get familiar with controlling search processes in the minimax search algorithm by means of a heuristic function.
The program used for the game implements English draughts, also referred to as American checkers or traditional checkers. The rules of the game in this version include mandatory captures, and all capture opportunities must be fully used. However, if there exist different possible capture moves, the player is not obliged to make the move that maximizes the number of captures. Pawns can only capture forwards. Once a pawn is promoted to king, it can move or capture in any direction, but only one step at a time.
The grade for this assignment will have a fixed part, awarded for an independently written working function, and a variable part, corresponding to the assessment of the performace of the function. This will be assessed in two ways: by assessing relative performance within the current group of students, and by assessing absolute performance from playing against some standard players.
Please submit your heuristic function as the original source code file. Make sure it is pure Java code and compiles cleanly within the program. Additional comments and conclusions to this assignment, if any, can be added in a separate "Note" for this assignment.
http://www.kcir.pwr.edu.pl/~witold/ai/Checkers_manual/index_en.html - Checkers program manual
http://www.kcir.pwr.edu.pl/~witold/ai/Checkers_manual/api_en.html - heuristic function API
https://en.wikipedia.org/wiki/English_draughts
The Checkers program can be executed on any system which has the standard Java virtual machine installed. However, in order to be able to compile new heuristics, the full Java development system must be installed (Java Development Kit, JDK), and the Java virtual machine contained in the JDK installation must be used to run the program (otherwise the program might not be able to locate the Java compiler).
The Java JDK version 11 which can be used for this project can be downloaded from (in order to download the installer you need to register with Oracle):
Alternatively, you can download a copy of the installer, without registering, from:
JDK 11 download from a local copy
Sometimes problems arise trying to run the Checkers program on Windows. Some common scenarios and approaches to solve them are described here.
In some cases, when multiple installations of Java exist within the system, the program might get executed by a Java virtual machine from a JRE installation, despite a JDK installation existing alongside.
The solutions consists of: (a) assuring that the standard path for program eexecution has the JDK binary directory before any other possible locations where Java virtual machines can be found, and/or (b) removing any JRE installations from the system.
Some people have reported problems running the Checkers program on a Windows machine under a locale different than English/Polish/Spanish/Russian, such as Portugese. A temporary workaround to change the locale to English is described here:
https://kcir.pwr.edu.pl/~witold/ai/Windows_locale_fix.txt
https://cs.huji.ac.il/~ai/projects/old/English-Draughts.pdf - introduction into the heuristic-based approach to Checkers and some rudimentary heuristics
https://onlinelibrary.wiley.com/doi/abs/10.1111/j.1468-0394.2007.00429.x - a quite thorough analysis of the construction of heuristics for Checkers (a preliminary version of this paper is freely available here: https://www.mini.pw.edu.pl/~mandziuk/PRACE/es_init.pdf)