Fruit and derivatives list !

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

Moderator: Ras

RoySawyer
Posts: 7
Joined: Tue May 09, 2023 7:11 pm
Full name: Roy Sawyer

Re: Fruit and derivatives list !

Post by RoySawyer »

To Rowen,

Right after I made the post I realised that the < Max Nps# > numbers were ambiguous
and I updated the engine parameters to explain them a bit more.

If you download the engine again the engine parameter list now shows
the number of pieces that they are used for.

The first thing to say is that if you have engaged the UCI_LimitStrength option
then they do not apply.

The reason I left the original code in is so that you have a choice of both methods.

If you wanted to weaken the engine via the nodes per second option
them the numbers apply to the current phase of the game as governed by
the number of pieces on the board.

Here is a fragment of the code that shows this process -

//--------------------------------------------------------------------------//

// Ryan Benitez code

phase = board_phase(SearchInput->board);

if (phase == 1)
max_nps = option_get_int("Max NPS1 (pieces >= 26)");

else if (phase == 2)
max_nps = option_get_int("Max NPS2 (pieces < 26)");

else if (phase == 3)
max_nps = option_get_int("Max NPS3 (pieces < 21)");

else if (phase == 4)
max_nps = option_get_int("Max NPS4 (pieces < 12)");

else if (phase == 5)
max_nps = option_get_int("Max NPS5 (pieces < 8)");

if (max_nps == 999999)
max_nps = 0;


// Roy Sawyer code

// this is followed by my limit strength code - somewhat simplified

// check whether UCI_LimitStrength is set in engine parameters

SearchInput->uci_limit_strength = option_get_bool("UCI_LimitStrength");

if (SearchInput->uci_limit_strength) // limit strength is set
{
// Code follows that sets < max_nps > from the < UCI_Elo > rating
// which over-rides the earlier < Max Nps# > settings that were read in

// get the elo rating
uci_elo = option_get_int("UCI_Elo");

// get the NPS_Elo adjustment value
nps_elo_adj = option_get_int("Nps_Elo adjustment");

// calculate nodes per second based on elo rating
// from the algorithm of Ferdinand Mosca
// with an added adjustment value to fine tune the conversion

// the earlier < max_nps > from number of pieces is now over-written

max_nps = (int)(pow(2.718, ((uci_elo + nps_elo_adj) / 297.12)));
}

//-----------------------------------------------------------------------//

The full code for this is in the Search() function in the file Search.cpp

The < max_nps > value is then used to govern the idle time loop
in the function search_update_current() in the file search.cpp
which in contained the < Build.7z > file in the download.

It would be possible to adjust the < max_nps > value that was calculated
for UCI_LimitStrength to account for the phase of the game
as was done by Ryan Benitez in the original code.

I suppose his idea is that by setting < Max Nps5 > lower than < Max Nps1 >,
for example, the engine would not search too deeply in the endgame.
Although human players also see deeper in the endgame.

Hope that explains the process.


Roy Sawyer
Elorejano
Posts: 122
Joined: Sat Mar 20, 2010 3:31 am

Re: Fruit and derivatives list !

Post by Elorejano »

Hi! are there a place to download this ooldies?
Im only interested in winboard engines
Thanks in advance