How to teach a program to press the King to the baseline?
Posted: 26 Jun 2010, 12:46
At first, sorry about my bad english, its not my native language.
I just created a game almost like Chess, but with some different pieces etc. But basicly its the same.
I have also written a computer engine to play the Game. The Program plays tactically already acceptable. But in the endgame it is extremely weak:( If there are no tactical threats the program has no plan what to do
Now I have a very general question. How can i teach the computer that he must press the enemy king to the baseline?
Are there somewhere HOWTOs at the Internet? Or is there someone who can give me a basic Idea?
In my evaluation function I created different field variables, so that the opposing king is given a penalty when he is on the outer lines, but it works somehow not good enough.
Any other strategy ideas?
I just created a game almost like Chess, but with some different pieces etc. But basicly its the same.
I have also written a computer engine to play the Game. The Program plays tactically already acceptable. But in the endgame it is extremely weak:( If there are no tactical threats the program has no plan what to do
Now I have a very general question. How can i teach the computer that he must press the enemy king to the baseline?
Are there somewhere HOWTOs at the Internet? Or is there someone who can give me a basic Idea?
In my evaluation function I created different field variables, so that the opposing king is given a penalty when he is on the outer lines, but it works somehow not good enough.
- Code: Select all
fieldmalus: array [0..9,0..9] of Integer = ((50,47,45,42,40,40,42,45,47,50), / / Column 0
(47,45,42,40,0,0,40,42,45,47) / / etc. / /to try the opponent
(45,42,40,0,0,0,0,40,42,45), / /King to push to the edge
(42,40,0,0,0,0,0,0,40,42)
(40,18,0,0, -10 -10,0,0,18,40)
(40,18,0,0, -10, -10,0,0,18,40)
(42,40,0,0,0,0,0,0,40,42)
(45,42,40,0,0,0,0,40,42,45)
(47,45,42,40,0,0,40,42,45,47)
(50,47,45,42,40,40,42,45,47,50)
);
AdditionalColumnRowMalus: array [0..9] of Integer = (57,50,45,10,0,0,10,45,50,57) / / In order to push the King to the outside
Any other strategy ideas?