deeds_chess_system

As in chess tournaments and matches...
Sedat Canbaz
Posts: 2289
Joined: Wed Jun 21, 2023 6:29 am

Re: opening book vs experience file

Post by Sedat Canbaz »

------------
:!: Notice:

This post in this topic has been reviewed and edited because it violated the OpenChess Forum Rules. This is a gentle reminder not to continue flaming this topic or others in the Forum. Further recurrent violations of the OpenChess Forum Rules will not be tolerated.

Thanks,

Best regards, Moderation.
------------



For what?
I have no shop for opening book/s
I have no shop for chess engine/s
I have no shop for any other chess item etc.
In other words, all this my job is free !!!

Btw, plus
I am not a Online player (since 2009 year)
So I have no goal for high Elo ratings...
But remember also that,
When I was as online player, I played with
User name: 'SedatChess' and I played with
Open-Formula..you understand what I mean?

Continuing...

Simply via organizing all these competitions:
I share results, produced by chess programs!
No more... no less...

And once more,
I clearly stated that StockfishMZ exp is based on
Eman's data... I realized to re-name it because the
Target was that StockfishMZ eng to use it as default..
Btw, I am free to release it with any name as I want,
Besides StockfishMZ generated own exp data over it..
So I see that here there is nothing wrong with that!

On other hand,
I see also that you tried everything about damaging
my prestige! but as usual, all without success..!!
Because, honesty is the best policy!
Amos 4ever
Posts: 62
Joined: Sun Aug 10, 2014 9:42 pm
Real Name: Marco Zerbinati

Re: opening book vs experience file

Post by Amos 4ever »

Sedat Canbaz wrote: Thu Jun 29, 2023 7:05 am


And once more,
I clearly stated that StockfishMZ exp is based on
Eman's data... I realized to re-name it because the
Target was that StockfishMZ eng to use it as default..
Hi Sedat,
just a clarification about me..
All version 2 experience files are based on SugaR's signature including Eman.
Best regards

Image
User avatar
deeds
Posts: 1482
Joined: Wed Oct 20, 2021 9:24 pm
Location: France
Contact:

Re: opening book vs experience file

Post by deeds »

------------
Notice:

This post in this topic has been reviewed and edited because it violated the OpenChess Forum Rules. This is a gentle reminder not to continue flaming this topic or others in the Forum. Further recurrent violations of the OpenChess Forum Rules will not be tolerated.

Thanks,

Best regards, Moderation.
------------


This is also why (among other things) that since 2021, I have stopped sharing my experience files and that I will stop publishing my learning sessions on OpenChess.
User avatar
deeds
Posts: 1482
Joined: Wed Oct 20, 2021 9:24 pm
Location: France
Contact:

Re: opening book vs experience file

Post by deeds »

ocf stalker wrote: All version 2 experience files are based on SugaR's signature including Eman.
Wrong !

Image

Image

Oops...
Amos 4ever
Posts: 62
Joined: Sun Aug 10, 2014 9:42 pm
Real Name: Marco Zerbinati

Re: opening book vs experience file

Post by Amos 4ever »

deeds wrote: Thu Jun 29, 2023 12:28 pm
ocf stalker wrote: All version 2 experience files are based on SugaR's signature including Eman.
Wrong !

Chris we are talking about 2 different things
Old Signature V1

Code: Select all

    ////////////////////////////////////////////////////////////////
    // V1
    ////////////////////////////////////////////////////////////////
    namespace V1
    {
        const char*  ExperienceSignature = "SugaR";
        const int    ExperienceVersion = 1;

        class ExperienceReader : public Experience::ExperienceReader
        {
        private:
            ExpEntry entry;

        public:
            explicit ExperienceReader() : entry((Key)0, MOVE_NONE, (Value)0, (Depth)0) {}

        public:
            virtual int get_version()
            {
                return ExperienceVersion;
            }

            virtual bool check_signature(ifstream& input, size_t inputLength)
            {
                return check_signature_set_count(input, inputLength, ExperienceSignature, sizeof(ExpEntry));
            }

            virtual bool read(ifstream& input, Current::ExpEntry* exp)
            {
                assert(match && input.is_open());

                if (!input.read((char*)&entry, sizeof(ExpEntry)))
                    return false;

                exp->key   = entry.key;
                exp->move  = (Move)entry.move;
                exp->value = (Value)entry.value;
                exp->depth = (Depth)entry.depth;
                exp->count = 1;

                return true;
            }
        };
    }

Current Signature V2

Code: Select all

    ////////////////////////////////////////////////////////////////
    // V2
    ////////////////////////////////////////////////////////////////
    namespace V2
    {
        const string ExperienceSignature = "SugaR Experience version 2";
        const int    ExperienceVersion = 2;

        class ExperienceReader : public Experience::ExperienceReader
        {
        public:
            explicit ExperienceReader() {}

        public:
            virtual int get_version()
            {
                return ExperienceVersion;
            }

            virtual bool check_signature(ifstream& input, size_t inputLength)
            {
                return check_signature_set_count(input, inputLength, ExperienceSignature, sizeof(ExpEntry));
            }

            virtual bool read(ifstream& input, Current::ExpEntry* exp)
            {
                assert(match && input.is_open());

                if (!input.read((char*)exp, sizeof(ExpEntry)))
                    return false;

                return true;
            }
        };
    }
"V1 and V2" signatures are incompatible with each other in read/write
in C++ code the signature has the purpose of making read/write compatibility between the different engines that use the same Learning code
-Eman
-SugaR
-HypnoS
-StockfishMZ
-Aurora
including all clones in circulation using code written by Khalid
Amos 4ever
Posts: 62
Joined: Sun Aug 10, 2014 9:42 pm
Real Name: Marco Zerbinati

Re: opening book vs experience file

Post by Amos 4ever »

To explain myself better..
if you open any experience file

all at the beginning of the first line bear the wording:

Code: Select all

SugarR Experience version 2
SugarR Experience version 2= signature V2
this makes them compatible in reading and writing between the different engines
botunnet
Posts: 66
Joined: Sun Jun 25, 2023 3:30 pm
Real Name: botunnet
Location: Hrvatska Republika
Contact:

Re: opening book vs experience file

Post by botunnet »

deeds wrote: Thu Jun 29, 2023 12:28 pm Wrong !
Hey Chris, i know you don't read C/C++ :
Image
But these 2 codes did the same thing, get the same data, only the header of the exp file who changes from "SugaR" to "SugaR Experience version 2".
User avatar
deeds
Posts: 1482
Joined: Wed Oct 20, 2021 9:24 pm
Location: France
Contact:

Re: opening book vs experience file

Post by deeds »

Botunnet, please, maybe you didn't follow but, after this, no one will explain exp file formats to me.
Amos 4ever
Posts: 62
Joined: Sun Aug 10, 2014 9:42 pm
Real Name: Marco Zerbinati

Re: opening book vs experience file

Post by Amos 4ever »

------------
:!: Notice:

This post in this topic has been reviewed and edited because it violated the OpenChess Forum Rules. This is a gentle reminder not to continue flaming this thread or others in the Forum. Further recurrent violations of the OpenChess Forum Rules will not be tolerated.

Thanks,

Best regards, Moderation.
------------


I know what I am saying and writing.
Amos 4ever
Posts: 62
Joined: Sun Aug 10, 2014 9:42 pm
Real Name: Marco Zerbinati

Re: opening book vs experience file

Post by Amos 4ever »

------------
Notice:

This post in this topic has been reviewed and edited because it violated the OpenChess Forum Rules. This is a gentle reminder not to continue flaming this topic or others in the Forum. Further recurrent violations of the OpenChess Forum Rules will not be tolerated.

Thanks,

Best regards, Moderation.
------------

botunnet wrote: Thu Jun 29, 2023 1:52 pm
deeds wrote: Thu Jun 29, 2023 12:28 pm Wrong !
Hey Chris, i know you don't read C/C++ :
Image
But these 2 codes did the same thing, get the same data, only the header of the exp file who changes from "SugaR" to "SugaR Experience version 2".

The V1 version is mentioned because the engine handles error pointers if you try to handle the old format.
The logic of the code has changed in the V2 version, as well as features being present that were absent in the V1 version

Code: Select all

            //Check if file signature is matching
            auto check_signature = [&]() -> bool
            {
                if (signature.empty())
                    return true;

                //If inpout length is less than the signature length then it can't be a match!
                if (inputLength < signature.length())
                    return false;

                //Start from the beginning of the file
                input.seekg(ios::beg);

                //Allocate memory for signature
                char* sigBuffer = (char*)malloc(signature.length());
                if (!sigBuffer)
                {
                    sync_cout << "info string Failed to allocate " << signature.length() << " bytes for experience signature verification" << sync_endl;
                    return false;
                }

                if (!input.read(sigBuffer, signature.length()))
                {
                    free(sigBuffer);
                    sync_cout << "info string Failed to read " << signature.length() << " bytes for experience signature verification" << sync_endl;
                    return false;
                }

                bool signatureMatching = memcmp(sigBuffer, signature.c_str(), signature.length()) == 0;

                //Free memory
                free(sigBuffer);

                return signatureMatching;
            };
Post Reply