There is a game that I programmed in java. The game is simple (see picture below). There are 4 birds and 1 larva. This is a two-player game (AI vs Human).
When the game begins, the larva begins, then ONE BIRD can move (any), then the Larva, etc.
I implemented MiniMax (Alpha Beta Pruning) and I use the following evaluation function () (heuristic function).
.
,
h (n) = - 1 - 2 - 3 - 4
:
. . , , , ?
/ ?
H(t)=max_distance(larva,line_8)+Σmin_distance(bird_n,larva)
H(t)=Σmin_distance(bird_n,larva) - min_distance(larva,line_1)
max_distance (, _8): , 1.
Σmin_distance (bird_n, larva): , ( ).
, , , , , , , , , .
1 . A1 8 A8. , , . . 1 . , 1 a 1, 2 a 2 .. , .
, , , , Larva MAX, .
Source: https://habr.com/ru/post/1615350/More articles:Iterate through custom Analysis column in Swift app - iosError: connect ENFILE 127.0.0.1:5984 - Local (undefined: undefined) - javascriptОшибка StackOverFlow для алгоритма QuickSort - javaMVC Include invalid error path - includeJavaScript and semicolon - node.jsHow to animate and properly enable the conversion of QML rotation to 3D - c ++How to solve this adb permission permission error - androidPython cannot import shadoworflow on Mac OS X 10.8 - pythonTensorflow import error in OS X 10.8.5 Expected in - pythonSonarQube: profile inheritance and deactivation of rules - sonarqubeAll Articles