MZFish 1.0 Settings

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

Moderators: hgm, Harvey Williamson, bob

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Eduard
Posts: 181
Joined: Fri Oct 26, 2018 10:58 pm
Location: Germany
Full name: Eduard Nemeth
Contact:

MZFish 1.0 Settings

First: I thank the programmer for this great engine (with interesting Settings). Thank You!

Can someone explain to me what exactly the following Settings work:

Move Base Importance = Minimum and maximum?
Scale Pieces Mg Value = Minim and Maximum?
Scale Pieces Eg Value = Minimum and maximum?

I read that so that the dynamics can be adjusted (Middle - and Endgame). Is that correct?

I have analyzed interesting middlegames and endgames, and I am surprised that with following big values MZFish 1.0 gived the best results:

Move Base Importance = (default 5) 3
Scale Pieces Mg Value = (default 5) 500
Scale Pieces Eg Value = (default 7) 250

Analyzes ware great! But I also played it on playchess.com, and results ware great too!

Guenther
Posts: 2815
Joined: Wed Oct 01, 2008 4:33 am
Location: Regensburg, Germany
Full name: Guenther Simon
Contact:

Re: MZFish 1.0 Settings

Eduard wrote:
Wed Jan 09, 2019 1:17 pm
First: I thank the programmer for this great engine (with interesting Settings). Thank You!

Can someone explain to me what exactly the following Settings work:

Move Base Importance = Minimum and maximum?
Scale Pieces Mg Value = Minim and Maximum?
Scale Pieces Eg Value = Minimum and maximum?

I read that so that the dynamics can be adjusted (Middle - and Endgame). Is that correct?

I have analyzed interesting middlegames and endgames, and I am surprised that with following big values MZFish 1.0 gived the best results:

Move Base Importance = (default 5) 3
Scale Pieces Mg Value = (default 5) 500
Scale Pieces Eg Value = (default 7) 250

Analyzes ware great! But I also played it on playchess.com, and results ware great too!
You should thank the SF programmers much more.
This is just a copy of latest SF, just that some hardcoded options are enabled and old book stuff is reused again, which was moved out of SF.

MG = middlegame
EG = endgame

for move base_importance here the source snippets from real SF and MZ-SF
(it is more or less just slightly renamed and enabled as option - it controls how much time to use in longer lasting games)
https://github.com/official-stockfish/S ... imeman.cpp
https://github.com/Zerbinati/MZfish/blo ... imeman.cpp

Code: Select all

``````enum TimeType { OptimumTime, MaxTime };

constexpr int MoveHorizon   = 50;   // Plan time management at most this many moves ahead
constexpr double MaxRatio   = 7.3;  // When in trouble, we can step over reserved time with this ratio
constexpr double StealRatio = 0.34; // However we must not steal time from remaining moves over this ratio

// move_importance() is a skew-logistic function based on naive statistical
// analysis of "how many games are still undecided after n half-moves". Game
// is considered "undecided" as long as neither side has >275cp advantage.
// Data was extracted from the CCRL game database with some simple filtering criteria.

double move_importance(int ply) {

constexpr double XScale = 6.85;
constexpr double XShift = 64.5;
constexpr double Skew   = 0.171;

return pow((1 + exp((ply - XShift) / XScale)), -Skew) + DBL_MIN; // Ensure non-zero
}

template<TimeType T>
TimePoint remaining(TimePoint myTime, int movesToGo, int ply, TimePoint slowMover) {

constexpr double TMaxRatio   = (T == OptimumTime ? 1.0 : MaxRatio);
constexpr double TStealRatio = (T == OptimumTime ? 0.0 : StealRatio);

double moveImportance = (move_importance(ply) * slowMover) / 100.0;
double otherMovesImportance = 0.0;

for (int i = 1; i < movesToGo; ++i)
otherMovesImportance += move_importance(ply + 2 * i);

double ratio1 = (TMaxRatio * moveImportance) / (TMaxRatio * moveImportance + otherMovesImportance);
double ratio2 = (moveImportance + TStealRatio * otherMovesImportance) / (moveImportance + otherMovesImportance);

return TimePoint(myTime * std::min(ratio1, ratio2)); // Intel C++ asks for an explicit cast
}``````

Code: Select all

``````enum TimeType { OptimumTime, MaxTime };

constexpr int MoveHorizon   = 50;   // Plan time management at most this many moves ahead
constexpr double MaxRatio   = 7.3;  // When in trouble, we can step over reserved time with this ratio
constexpr double StealRatio = 0.34; // However we must not steal time from remaining moves over this ratio
double baseimportance   = DBL_MIN; //current (trivial) value

// move_importance() is a skew-logistic function based on naive statistical
// analysis of "how many games are still undecided after n half-moves". Game
// is considered "undecided" as long as neither side has >275cp advantage.
// Data was extracted from the CCRL game database with some simple filtering criteria.

double move_importance(int ply) {

constexpr double XScale = 6.85;
constexpr double XShift = 64.5;
constexpr double Skew   = 0.171;

return pow((1 + exp((ply - XShift) / XScale)), -Skew) + baseimportance; // Ensure non-zero
}

template<TimeType T>
TimePoint remaining(TimePoint myTime, int movesToGo, int ply, TimePoint slowMover) {

constexpr double TMaxRatio   = (T == OptimumTime ? 1.0 : MaxRatio);
constexpr double TStealRatio = (T == OptimumTime ? 0.0 : StealRatio);

double moveImportance = (move_importance(ply) * slowMover) / 100.0;
double otherMovesImportance = 0.0;

for (int i = 1; i < movesToGo; ++i)
otherMovesImportance += move_importance(ply + 2 * i);

double ratio1 = (TMaxRatio * moveImportance) / (TMaxRatio * moveImportance + otherMovesImportance);
double ratio2 = (moveImportance + TStealRatio * otherMovesImportance) / (moveImportance + otherMovesImportance);

return TimePoint(myTime * std::min(ratio1, ratio2)); // Intel C++ asks for an explicit cast
}``````
BTW the min/max values for those in 'MZ-Fish' make (except min for move_importance) no sense to me and so do your values for scaling MG/EG pieces instead of default
Current foe list count : [83]
http://rwbc-chess.de/chronology.htm

jmartus
Posts: 198
Joined: Sun May 16, 2010 12:50 am

Re: MZFish 1.0 Settings

Show proof of these settings at least 100 games

Eduard
Posts: 181
Joined: Fri Oct 26, 2018 10:58 pm
Location: Germany
Full name: Eduard Nemeth
Contact:

Re: MZFish 1.0 Settings

Thank You!

You are right. The work of the Stockfish programmers is great! I am very thankful for that. I like to play with the engine.
Stockfish is getting better. With more Elo. And that is good! But there are other Chess types (Corr., etc..). But with normal
Stockfish fewer and fewer parameters can be set. So if I want to use the full power of Stockfish, paired with interesting
adjustment possibilities, then I have to take a another "fish". And here are sereval very interesting engines!
On of them is MZfish.

Here an example. Following position does not solve Stockfish 10. But with the MZfish I can use the full Stockfish (playing!) power,
and use the tactic mode (Tactical = 6) of MZfish for my analysis (new release MZfish 080119):

Analysis by MZfish 080119 64 POPCNT:

18.Nh6+ gxh6 19.Rxh6 Kg7 20.Rdh1 Nbd7 21.Rh8 Nf6 22.gxf6+ Kxf6 23.R1h6+ Ke7 24.Qxd4 Kd7 25.Qg7 Kc6 26.Qxf7 Qe7 27.Qh5 Kc7 28.Kb2 e5 29.fxe5 Qxe5 30.Qxe5
-+ (-2.20) Depth: 17/38 00:01:12 61476kN
18.Nh6+ gxh6 19.Rxh6 Kg7 20.Rdh1 Nbd7 21.Rh8 Nf6 22.gxf6+ Kxf6 23.R1h6+ Ke7 24.Qxd4 Kd7 25.Qg7 Kc6 26.Qxf7 Qe7 27.Qh5 Kc7 28.Kb2 e5 29.fxe5 Qxe5 30.Qxe5

18.Nh6+ gxh6 19.Rxh6 Nfd7 20.Qxd4 e5 21.Qd5 Nf8 22.Qxa8 exf4 23.Qd5 Re6 24.Rdh1 Rxh6 25.Rxh6 Qe7
= (-0.29) Depth: 19/31 00:01:44 165MN