Help with Komodo 1.0 personalities.

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Rebel, chrisw

BrendanJNorman
Posts: 2524
Joined: Mon Feb 08, 2016 12:43 am
Full name: Brendan J Norman

Help with Komodo 1.0 personalities.

Post by BrendanJNorman »

Hey guys,

I'd like to try to make some personalities in Komodo 1.0, but would like some instruction.

Could anybody explain what the values in the .per files mean and how to tweak them properly?

Thanks! You'll be the first to hear of any interesting personalities. ;)
User avatar
Ovyron
Posts: 4556
Joined: Tue Jul 03, 2007 4:30 am

Re: Help with Komodo 1.0 personalities.

Post by Ovyron »

All comment lines begin with the '#' character.

Each configuration option is on a separate line.

Each adjustable weight in Komodo is defined by the name of the
evaluation term and 2 integer values describing the opening and
endgame weight to be assigned. Komodo interpolates these values
between 24 different game stages.

If you forget or accidently delete a value in the personality file,
Komodo will assume the value to be 0 for that particular parameter.

Keep in mind that Komodo tries to center the values of the weights.
For instance if you raise the value of the knight table multipler, it
will not change the average value of a knight. So you do not
necessarily have to compensate by lowering the value of the knight.
In the case of mobility, Komodo also centers the values so that poor
mobility is negative and "average" mobility is about zero, regardless
of how you set the weights.

You cannot arbitrarily change the scale of the weights as Komodo
depends on the approximate value of pawn to be around 1000 for things
like lazy evaluation, futility pruning and other things. So the value
of pawn should be something fairly close to 1000 to get the best
results.

The configuration file does not give you complete control over the
evaluation function, but it does give you a lot. For instance you
cannot change the individual square values as defined by the internal
piece square tables in Komodo which handle basic things like
centralizing knights and so on. Candidate passed pawn values are a
percentage of the passed pawn values and are not currently adjustable.
And there are other things similar to this that you cannot control.

With UCI interface you will be able to set the name of a configuration
file to use for Komodo - so you have the option to make several. If
this is not set then the default weights will be used.


A brief description of what each terms is:

pmob pawn mobility - bonus for empty square in front
nmob knight mobility
bmob bishop mobility
rmob rook mobility
ropen rook on open file bonus
rhalf rook on half open file bonus
qmob queen mobility
blockedopen backward pawn that is blocked or inhibited
kppdist bonus for king being close to square in front of passed pawns
ntabm piece square table multiplier for knight
btabm piece square table multiplier for bishop
rtabm piece square table multiplier for rook
qtabm piece square table multiplier for queen
ktabm piece square table multiplier for king
luftp having luft for king on back rank
ksarea king safety attacks against king
ksdefm pawn storm defense
ksattm pawn storm attacks
pthreat bonus for each enemy piece attacked by a pawn
outpost outpost bonus for bishops and knights and rooks
minorbehind small bonus for having minor piece directly behind a pawn
rook7th value of placing a rook on the 7th rank (when enemy king is on 8th)


static features
-------------------------
pval base value of a pawn
nval base value of a knight
bval base value of a bishop
rval base value of a rook
qval base value of a queen
bpair bishop pair bonus
rpair rook pair bonus
qpair queen pair bonus
pdoubled doubled pawn penalty
predundant number squares attacked by pawns
islands pawn islands
isoh isloated pawn on half open file
isoo isolated pawn on open file
duofended pawn that is defended or adjacent to another friendly pawn
pbkwd backward pawn
passed passed pawn
ppinc progressive passed pawn increment for moving forward
ptabm piece square table multiplier for pawns
nwp knight bonus based on pawn count
bwp bishop bonus based on pawn count
rwp rook bonus based on pawn count
hmb having the move bonus


Yeah, I was lazy this time around and just copied and pasted the personality.README file's contents :lol:

Yeah, I had to actually edit the file's extension and add .txt at the end to be able to read it...
BrendanJNorman
Posts: 2524
Joined: Mon Feb 08, 2016 12:43 am
Full name: Brendan J Norman

Re: Help with Komodo 1.0 personalities.

Post by BrendanJNorman »

Ovyron wrote:All comment lines begin with the '#' character.

Each configuration option is on a separate line.

Each adjustable weight in Komodo is defined by the name of the
evaluation term and 2 integer values describing the opening and
endgame weight to be assigned. Komodo interpolates these values
between 24 different game stages.

If you forget or accidently delete a value in the personality file,
Komodo will assume the value to be 0 for that particular parameter.

Keep in mind that Komodo tries to center the values of the weights.
For instance if you raise the value of the knight table multipler, it
will not change the average value of a knight. So you do not
necessarily have to compensate by lowering the value of the knight.
In the case of mobility, Komodo also centers the values so that poor
mobility is negative and "average" mobility is about zero, regardless
of how you set the weights.

You cannot arbitrarily change the scale of the weights as Komodo
depends on the approximate value of pawn to be around 1000 for things
like lazy evaluation, futility pruning and other things. So the value
of pawn should be something fairly close to 1000 to get the best
results.

The configuration file does not give you complete control over the
evaluation function, but it does give you a lot. For instance you
cannot change the individual square values as defined by the internal
piece square tables in Komodo which handle basic things like
centralizing knights and so on. Candidate passed pawn values are a
percentage of the passed pawn values and are not currently adjustable.
And there are other things similar to this that you cannot control.

With UCI interface you will be able to set the name of a configuration
file to use for Komodo - so you have the option to make several. If
this is not set then the default weights will be used.


A brief description of what each terms is:

pmob pawn mobility - bonus for empty square in front
nmob knight mobility
bmob bishop mobility
rmob rook mobility
ropen rook on open file bonus
rhalf rook on half open file bonus
qmob queen mobility
blockedopen backward pawn that is blocked or inhibited
kppdist bonus for king being close to square in front of passed pawns
ntabm piece square table multiplier for knight
btabm piece square table multiplier for bishop
rtabm piece square table multiplier for rook
qtabm piece square table multiplier for queen
ktabm piece square table multiplier for king
luftp having luft for king on back rank
ksarea king safety attacks against king
ksdefm pawn storm defense
ksattm pawn storm attacks
pthreat bonus for each enemy piece attacked by a pawn
outpost outpost bonus for bishops and knights and rooks
minorbehind small bonus for having minor piece directly behind a pawn
rook7th value of placing a rook on the 7th rank (when enemy king is on 8th)


static features
-------------------------
pval base value of a pawn
nval base value of a knight
bval base value of a bishop
rval base value of a rook
qval base value of a queen
bpair bishop pair bonus
rpair rook pair bonus
qpair queen pair bonus
pdoubled doubled pawn penalty
predundant number squares attacked by pawns
islands pawn islands
isoh isloated pawn on half open file
isoo isolated pawn on open file
duofended pawn that is defended or adjacent to another friendly pawn
pbkwd backward pawn
passed passed pawn
ppinc progressive passed pawn increment for moving forward
ptabm piece square table multiplier for pawns
nwp knight bonus based on pawn count
bwp bishop bonus based on pawn count
rwp rook bonus based on pawn count
hmb having the move bonus


Yeah, I was lazy this time around and just copied and pasted the personality.README file's contents :lol:

Yeah, I had to actually edit the file's extension and add .txt at the end to be able to read it...
Thanks buddy.

I have a very interesting positional personality testing right now.

Looks promising.
User avatar
Ovyron
Posts: 4556
Joined: Tue Jul 03, 2007 4:30 am

Re: Help with Komodo 1.0 personalities.

Post by Ovyron »

Looking forward to it! You should match it against Komodo KingHunter one day, let's see if it manages to hunt the king, or if all its attempts flat out fail as Positional shows why obsessing with the opponent's king should have its limits :D

I was very sad when they removed personalities from Komodo, and specially, the reason they did. They don't get us, people that want to see different styles of engines playing, and they only wanted people to test a personality that had higher elo than default... Oh well, it's better than nothing, I guess!
BrendanJNorman
Posts: 2524
Joined: Mon Feb 08, 2016 12:43 am
Full name: Brendan J Norman

Re: Help with Komodo 1.0 personalities.

Post by BrendanJNorman »

Ovyron wrote:Looking forward to it! You should match it against Komodo KingHunter one day, let's see if it manages to hunt the king, or if all its attempts flat out fail as Positional shows why obsessing with the opponent's king should have its limits :D

I was very sad when they removed personalities from Komodo, and specially, the reason they did. They don't get us, people that want to see different styles of engines playing, and they only wanted people to test a personality that had higher elo than default... Oh well, it's better than nothing, I guess!
They are literally beating each other up right now. :lol:

I have no idea yet who is stronger, but it seems like "Positional" (who will get a real name later) has a slight edge.

This game plays out like a Kasparov vs Karpov battle.

Look at 35.Re5!! :lol:

[pgn][Event "Kinghunter vs Positional Match 3 2"]
[Site "BRENDANNORMD8A2"]
[Date "2018.01.05"]
[Round "1"]
[White "Komodo 1.0 Kinghunter"]
[Black "Komodo 1.0 Positional"]
[Result "0-1"]
[ECO "B14"]
[WhiteElo "2200"]
[BlackElo "2200"]
[PlyCount "87"]
[EventDate "2018.??.??"]
[TimeControl "60+1"]

1. e4 c6 2. d4 d5 3. exd5 cxd5 4. c4 Nf6 5. Nf3 {0.32/13 2} e6 {0.01/12 3} 6.
Nc3 {0.35/13 3} Be7 7. Bd3 {0.45/13 2} Nc6 {0.08/14 2} 8. O-O {0.35/14 2} O-O {
0.00/14 11} 9. c5 {0.30/12 3} b6 {0.10/13 4} 10. Bb5 {0.12/13 2} Bd7 {0.32/13 4
} 11. Bxc6 {-0.14/13 2} Bxc6 {0.34/11 0} 12. Ne5 {-0.03/14 2} Be8 {0.40/12 1}
13. c6 {0.20/12 1} Qc8 {1.19/16 2} 14. Bf4 {-0.36/13 2} Bxc6 {1.29/11 0} 15.
Rc1 {-0.45/13 4} Qe8 {1.34/14 1} 16. Qd3 {-0.34/11 1} a6 {1.46/15 4} 17. Rfe1 {
-0.17/12 2} Nh5 {1.47/15 4} 18. Bd2 {-0.03/13 3} Bb7 {1.44/13 1} 19. Ne2 {
-0.28/12 1} a5 {1.36/13 1} 20. Qb3 {-0.22/13 4} Bd8 {1.47/15 2} 21. h3 {
-0.30/12 1} f6 {1.40/12 3} 22. Nf3 {-0.35/13 1} g5 {1.62/12 1} 23. Nh2 {
-0.42/11 1} Ng7 {1.72/13 3} 24. Ng3 {-0.61/13 3} h5 {1.77/14 1} 25. f4 {
-0.62/12 1} gxf4 {1.79/13 2} 26. Bxf4 {-0.12/10 0} h4 {1.72/14 2} 27. Ngf1 {
-0.12/13 1} a4 {1.66/11 1} 28. Qd1 {-0.03/13 1} Rf7 {1.68/12 1} 29. Ng4 {
0.35/13 1} Kh8 {1.62/13 2} 30. Nh6 {0.35/12 1} Rd7 {1.86/13 1} 31. Nd2 {
0.31/12 1} a3 {1.93/13 1} 32. b3 {0.46/13 1} Be7 {1.75/13 1} 33. Nf3 {0.76/14 2
} Qh5 {1.13/14 1} 34. Qd2 {0.71/12 1} Re8 {0.87/14 3} 35. Re5 {1.26/13 1} fxe5
{2.05/10 0} 36. Nxe5 {-0.21/14 2} Bc8 {1.96/15 5} 37. Rxc8 {-0.30/13 1} Rxc8 {
3.44/14 1} 38. Nxd7 {-0.20/14 1} Qg6 {3.48/14 1} 39. Ne5 {-1.39/14 2} Qe4 {
3.90/13 1} 40. Qd1 {-1.48/14 1} Kh7 {4.34/13 0} 41. Qg4 {-2.84/14 1} Rc2 {
6.17/14 4} 42. Nef7 {-5.56/13 4} Rxa2 {8.48/13 0} 43. Kh2 {-9.79/13 0} Rf2 {
9.86/14 1} 44. Bd6 {adjudication} 0-1[/pgn]

About removing personalities from Komodo because of people making "weak" personalities, yeah that's pretty ridiculous in my view.

I receive emails every day from people asking for the settings to various personalities I've mentioned on my site, so the market for "interesting STYLED" engines, whether for use a training partner or analysis, is also pretty huge.

We aren't the only ones! :lol:

I think besides the training features, rated personalities were the main reason for the ChessMaster franchise's great success.

It was the reason I fell in love with computer chess starting with an old copy of CM3000 back in 1997.

With good marketing and a nice GUI, anybody would model that success today since the chess market has exploded since CM days.
Last edited by BrendanJNorman on Thu Jan 04, 2018 8:30 pm, edited 1 time in total.
PK
Posts: 893
Joined: Mon Jan 15, 2007 11:23 am
Location: Warsza

Re: Help with Komodo 1.0 personalities.

Post by PK »

Note that Stockfish team did the same. Until Stockfish DD they had asymmetric weights for "Agression" and "Cowardice", i.e. program's attacks on enemy king and opponent's attacks on program's king. Extend this principle to mobility, add another weight for material evaluation - and You have 75% of Rodent's personality system.
Damir
Posts: 2800
Joined: Mon Feb 11, 2008 3:53 pm
Location: Denmark
Full name: Damir Desevac

Re: Help with Komodo 1.0 personalities.

Post by Damir »

Brandon, do you know where I can find this Komodo 1.0 with personalities?
Can you post a link to it please ? :) :)
BrendanJNorman
Posts: 2524
Joined: Mon Feb 08, 2016 12:43 am
Full name: Brendan J Norman

Re: Help with Komodo 1.0 personalities.

Post by BrendanJNorman »

PK wrote:Note that Stockfish team did the same. Until Stockfish DD they had asymmetric weights for "Agression" and "Cowardice", i.e. program's attacks on enemy king and opponent's attacks on program's king. Extend this principle to mobility, add another weight for material evaluation - and You have 75% of Rodent's personality system.
I guess you and Ed will have to lead the way now, Pawel. ;)

BTW...

How the HELL did black survive this?

[pgn][Event "Kinghunter vs Positional Match 3 2"]
[Site "BRENDANNORMD8A2"]
[Date "2018.01.05"]
[Round "7"]
[White "Komodo 1.0 Kinghunter"]
[Black "Komodo 1.0 Positional"]
[Result "1/2-1/2"]
[ECO "B17"]
[WhiteElo "2200"]
[BlackElo "2200"]
[PlyCount "195"]
[EventDate "2018.??.??"]
[TimeControl "60+1"]

1. e4 c6 2. d4 d5 3. Nd2 dxe4 4. Nxe4 Nd7 5. Nf3 Ngf6 {-0.24/14 2} 6. Ng3 h5 {
-0.14/13 3} 7. Bg5 {0.67/13 5} Qb6 {-0.11/12 2} 8. Bd3 {0.91/13 3} Qxb2 {
0.74/13 3} 9. O-O {0.89/14 3} e6 {0.82/14 8} 10. Qe2 {0.96/13 1} Qb6 {0.71/13 8
} 11. Nf5 {1.57/12 2} c5 {0.33/11 2} 12. Rab1 {1.93/12 10} Qc7 {0.73/11 2} 13.
Rfe1 {2.29/12 5} Nd5 {0.43/11 2} 14. Bc4 {3.03/11 2} N7b6 {-0.05/13 2} 15. Rxb6
{3.59/11 1} Nxb6 {1.57/10 0} 16. Bb5+ {2.48/10 1} Bd7 {0.72/14 1} 17. Ne5 {
2.48/9 0} Bc6 {0.33/11 1} 18. Bxc6+ {2.48/10 1} bxc6 {0.58/10 0} 19. dxc5 {
2.79/11 2} Nd5 {-0.29/13 2} 20. Ng6 {3.08/11 1} Rh7 {-0.42/12 2} 21. Nd4 {
1.45/9 2} Qd7 {-0.25/12 2} 22. Ne5 {4.07/12 2} Qc8 {-0.47/12 1} 23. Qd3 {
4.89/10 1} g6 {-0.77/12 5} 24. Ndxc6 {4.71/8 0} Rg7 {-0.75/12 1} 25. Qb5 {
6.17/11 1} Nc7 {-1.63/12 1} 26. Qb4 {6.19/12 1} Na6 {-0.16/13 6} 27. Qa5 {
6.08/11 2} Nxc5 {-0.25/13 1} 28. Rd1 {6.01/8 0} Nb7 {0.00/11 1} 29. Qb5 {
7.53/12 1} a6 {-0.03/14 1} 30. Qa4 {6.34/12 2} Nc5 {0.00/14 0} 31. Qh4 {
5.88/12 2} Qc7 {0.31/13 1} 32. Bd8 {6.80/12 2} Qb7 {0.00/12 1} 33. g3 {6.78/12
1} Rh7 {0.30/12 1} 34. Qf4 {5.91/11 1} Qb2 {0.70/12 1} 35. Bh4 {5.30/11 1} Qb6
{0.48/12 1} 36. a4 {7.79/11 1} Qb7 {0.67/11 1} 37. Kg2 {5.86/10 1} a5 {0.87/12
1} 38. f3 {5.19/13 6} Qb6 {0.31/12 1} 39. Bd8 {5.51/12 1} Qa6 {0.09/11 1} 40.
c4 {5.90/11 1} Qb7 {0.15/10 1} 41. Kg1 {4.49/11 4} Nxa4 {1.26/11 1} 42. Bxa5 {
3.12/12 3} Qb3 {1.22/12 3} 43. Rd7 {2.25/13 2} Bc5+ {1.13/11 1} 44. Kf1 {
1.42/13 1} Qc2 {1.18/10 1} 45. Bd2 {0.61/12 1} Nb6 {1.65/12 1} 46. Rb7 {
1.14/12 0} h4 {2.47/11 1} 47. gxh4 {-2.30/11 1} Nxc4 {2.32/13 1} 48. Nxc4 {
-2.08/13 1} Qd1+ {2.26/9 0} 49. Kg2 {-2.15/14 0} Qg1+ {2.40/12 0} 50. Kh3 {
-1.96/14 0} Qf1+ {2.32/10 0} 51. Kg4 {-2.19/13 0} f5+ {2.44/12 1} 52. Kg5 {
-2.20/12 0} Rxb7 {2.36/12 1} 53. Kxg6 {-2.02/12 0} Qg2+ {2.25/11 1} 54. Qg3 {
-1.97/15 2} Qe2 {1.53/12 1} 55. Kh5 {-1.19/14 1} Rh7+ {1.50/11 0} 56. Bh6 {
-1.17/12 0} Kd7 {1.39/12 0} 57. N6e5+ {-1.41/12 0} Kc7 {2.03/8 0} 58. Kg6 {
-2.08/13 4} Re7 {2.08/11 1} 59. Qf4 {-2.09/11 1} Kb7 {2.02/9 1} 60. Qd2 {
-2.02/12 2} Qxd2 {1.95/12 1} 61. Bxd2 {-2.11/13 0} Ka6 {1.98/12 1} 62. h5 {
-2.16/12 0} Kb5 {2.00/13 1} 63. h6 {-2.02/11 0} Rc7 {1.98/13 1} 64. Bf4 {
-1.81/12 1} Rg8+ {1.90/11 1} 65. Kf6 {-1.90/12 0} Rf8+ {1.79/13 2} 66. Kg6 {
-1.93/13 0} Rh8 {1.80/13 1} 67. Kf6 {-1.94/12 0} Re8 {1.76/13 0} 68. Kg6 {
-1.86/12 0} Rce7 {1.78/12 0} 69. Bd2 {-1.72/10 0} Rg8+ {1.95/12 1} 70. Kf6 {
-2.01/13 2} Rf8+ {1.78/12 1} 71. Kg5 {-2.00/13 0} Ra7 {2.06/12 1} 72. Kg6 {
-2.16/11 1} Rh8 {1.98/12 2} 73. Kf6 {-1.91/13 1} Ra6 {1.99/12 0} 74. Bg5 {
-1.85/11 0} Bd4 {1.89/11 0} 75. Kg7 {-1.91/12 0} Rc8 {1.50/11 1} 76. h7 {
-1.75/12 0} Rc7+ {1.67/13 1} 77. Kg6 {-1.64/12 0} Ra8 {1.58/14 1} 78. Nd6+ {
-1.66/12 0} Kc5 {1.37/11 0} 79. Nef7 {-1.22/12 0} Rd7 {1.79/10 0} 80. h4 {
-1.54/13 1} Kd5 {1.22/11 0} 81. Bf6 {-1.24/13 0} Bxf6 {0.71/13 0} 82. Kxf6 {
-1.19/14 0} Rc7 {0.00/12 0} 83. Kg7 {0.00/14 1} Rc3 {0.60/13 0} 84. h5 {
0.18/15 2} Re3 {0.00/12 0} 85. h6 {0.57/16 1} Rxf3 {-0.56/14 1} 86. Nb5 {
0.89/13 0} Rg3+ {-1.09/14 1} 87. Kf6 {1.20/13 0} Kc6 {-1.28/14 0} 88. Nd4+ {
1.58/13 0} Kd7 {-1.39/15 1} 89. h8=Q {1.61/15 0} Rxh8 {-1.24/12 0} 90. Nxh8 {
1.80/12 0} Rh3 {-1.56/15 0} 91. Nf7 {2.11/16 1} f4 {-1.71/14 1} 92. Kg6 {
2.23/16 0} Ke7 {-1.59/14 1} 93. Ng5 {2.46/15 1} Rh1 {-2.17/15 2} 94. h7 {
2.90/16 1} Rh2 {-2.33/16 1} 95. Ndf3 {2.98/16 0} Rh1 {-2.54/16 1} 96. Ne5 {
3.09/17 0} Ke8 {-2.57/15 0} 97. Nxe6 {3.13/17 1} Rxh7 {-2.61/16 0} 98. Kxh7 {
adjudication} 1/2-1/2[/pgn]

Mind boggling.

I'm gonna put this guy against OpenTal, Rodent Kasparov, Zappa Mexico DA and some other killers next.
BrendanJNorman
Posts: 2524
Joined: Mon Feb 08, 2016 12:43 am
Full name: Brendan J Norman

Re: Help with Komodo 1.0 personalities.

Post by BrendanJNorman »

Damir wrote:Brandon, do you know where I can find this Komodo 1.0 with personalities?
Can you post a link to it please ? :) :)
Sure man, I'll upload it when I get up.

It's 4am here, so I better sleep.

Stupid me, Uly told me how to mess with Komodo's settings and x hours later... :roll:
User avatar
Ovyron
Posts: 4556
Joined: Tue Jul 03, 2007 4:30 am

Re: Help with Komodo 1.0 personalities.

Post by Ovyron »

Damir wrote:Brandon, do you know where I can find this Komodo 1.0 with personalities?
Can you post a link to it please ? :) :)
It's here!:

http://komodochess.com/pub/komodo10-ja.zip

From the page that has links to all free versions:

https://komodochess.com/downloads.htm

Here's Komodo KingHunter Personality:

#Kinghunter personality for Komodo 1.0

# dynamic features
# -------------------------
pmob 48 125
nmob 64 56
bmob 64 65
rmob 25 48
ropen 205 180
rhalf 55 75
qmob 25 35
blockedopen -60 -84
kppdist 0 33
ntabm 30 12
btabm 14 14
rtabm 16 12
qtabm 14 14
ktabm 12 12
luftp -108 -180
ksarea 15 0
ksdefm 13 0
ksattm 13 0
pthreat 79 127
outpost 35 36
minorbehind 38 0
rook7th 60 160


# static features
# -------------------------
pval 850 1150
nval 3200 3800
bval 3200 3800
rval 4900 6400
qval 10100 12100
bpair 333 666
rpair -125 -175
qpair -80 -120
pdoubled -50 -80
predundant 10 10
islands -30 -60
isoh -35 -35
isoo -140 -170
duofended 20 0
pbkwd -35 -45
passed 14 23
ppinc 100 160
ptabm 10 10
nwp 25 25
bwp 20 20
rwp -25 -25
hmb 90 20