Would you like to react to this message? Create an account in a few clicks or log in to continue.

Computer Chess
HomeHome  CalendarCalendar  Latest imagesLatest images  FAQFAQ  SearchSearch  MemberlistMemberlist  UsergroupsUsergroups  RegisterRegister  Log in  

Post new topic   Reply to topic

 Controlled randomness of evaluation function

Go down 

Posts : 38
Join date : 2020-12-01

Controlled randomness of evaluation function Empty
PostSubject: Controlled randomness of evaluation function   Controlled randomness of evaluation function EmptySun Dec 06, 2020 10:07 am

There are two main ways of creating weaker levels of chess engine: (1) slowing it down and (2) adding a random factor to evaluation function. My standard way of doing the latter is as follows:

((position->hashKey ^ randomValueObtainedAtGameStart) % noiseValue) - noiseValue / 2;

This pseudo-random value is associated with position hash key, which ensures that it stays the same whenever a position is evaluated, so it does not mess up the search. Xoring by a random value obtained at game start is necessary, so that the engine does not repeat the same game over and over again.

Possible objection is that modulo causes a slowdown. But this is not a problem - typically, evaluation score is disturbed at weaker levels, which are already slowed down by (1)

Admin and matejst like this post

Back to top Go down
Controlled randomness of evaluation function
Back to top 
Page 1 of 1
 Similar topics
» I would like to see play against yourself in the evaluation function
» TOGA IV with Rebel 14.1 NNUE evaluation
» TOGA IV with Rebel 14.2 NNUE evaluation

Permissions in this forum:You can reply to topics in this forum
ProDeo :: Programmer Corner-
Post new topic   Reply to topicJump to: