Can nobody compile Roden IV?

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

Moderators: Harvey Williamson, Dann Corbit, hgm

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
User avatar
abik
Posts: 749
Joined: Fri Dec 01, 2006 9:46 pm
Location: Mountain View, CA, USA
Full name: Aart Bik
Contact:

Re: Can nobody compile Roden IV?

Post by abik » Mon Mar 02, 2020 7:27 pm

abik wrote:
Fri Feb 21, 2020 8:52 pm
Can you send me the peter.txt please? I can debug this a bit more for you.
Thanks for the sample file, Peter. If you set the option "Verbose" to true, you get some more feedback.
In this case (and by looking at the modified sources), you will have to set up an absolute path.
See my debug sessions below.

Code: Select all

setoption name Verbose value true

setoption name PersonalityFile value strangler.txt
info string reading personality 'strangler.txt' (failure)      // relative path yields failure 
                                                               // (even though file was "parallel" to engine)

setoption name PersonalityFile value /sdcard/Peter/strangler.txt
info string reading personality '/sdcard/Peter/strangler.txt' (success)  // absolute path into sdcard works
info string reading book file 'strangler.bin' (failure)       // ignore this, I did not have the book bin files
info string reading book file 'rodent.bin' (failure)          // this failure means the personality file is read
                                                              // successfully; you probably want to define the book
                                                              // paths inside this file in absolute format too

User avatar
abik
Posts: 749
Joined: Fri Dec 01, 2006 9:46 pm
Location: Mountain View, CA, USA
Full name: Aart Bik
Contact:

Re: Can nobody compile Roden IV?

Post by abik » Mon Mar 02, 2020 8:27 pm

And this time also with the book files.

Indeed, one needs to set the UCI options for these with absolute path. So in the personality file, change

Code: Select all

setoption name GuideBookFile value strangler.bin
setoption name MainBookFile value rodent.bin
to (using your own path of course if you have something else):

Code: Select all

setoption name GuideBookFile value /sdcard/Peter/strangler.bin
setoption name MainBookFile value /sdcard/Peter/rodent.bin
Then all works!

Code: Select all

setoption name PersonalityFile  value /sdcard/Peter/strangler.txt
info string reading personality '/sdcard/Peter/strangler.txt' (success)
info string reading book file '/sdcard/Peter/strangler.bin' (success/m)
info string reading book file '/sdcard/Peter/rodent.bin' (success/m)
So, armed with this knowledge, you should be able to play Rodent on Android now using your favorite personalities, Peter!

User avatar
abik
Posts: 749
Joined: Fri Dec 01, 2006 9:46 pm
Location: Mountain View, CA, USA
Full name: Aart Bik
Contact:

Re: Can nobody compile Roden IV?

Post by abik » Mon Mar 02, 2020 8:48 pm


shogi4fun
Posts: 30
Joined: Thu Aug 26, 2010 3:32 pm

Re: Can nobody compile Roden IV?

Post by shogi4fun » Thu Mar 05, 2020 3:56 pm

abik wrote:
Fri Feb 28, 2020 6:10 pm
xr_a_y wrote:
Thu Feb 27, 2020 9:50 am
but when used in chess for android it plays some move and then I see "engine resing"
I don't know how to debug this, is there log available somewhere when running chess for android, can you help me with this please ?
Do you mean "resign"? If this happens during a tournament, have a look at the saved PGN games. They contain more logging information on why the engine resigned (sometimes it is arbitration due to a illegal move). The engine works fine for me with some simple testing, but I will run a small tournament and see what happens.
Hi abik,

I can reproduce the bug, with CfA and also in terminal emulation.
It raises only if pondering is on.

Minic has problems when the stop- and the next command are sent too close together.
So for example first send:

Code: Select all

position startpos moves e2e4 e7e5 b1c3
go ponder movetime 1000
Than sending the following 2 lines together (for example copy'n'paste into terminal)

Code: Select all

stop
position startpos moves e2e4 e7e5 f2f4
Than you'll get an error "Trying to read bad move, not legal Position".

This was the easy one, the short post. ;-)

shogi4fun
Posts: 30
Joined: Thu Aug 26, 2010 3:32 pm

Re: Can nobody compile Roden IV?

Post by shogi4fun » Thu Mar 05, 2020 4:17 pm

Strange - I started working on the code of Rodent IV close to the time this thread was created without knowing it.
(I knew only this one: viewtopic.php?t=72742)

I also like the idea behind rodent, not focusing on maximum strength (as almost all otheres are doing), but on personalities.

At fist I started, only to solve the well known problem with the pathes.
But than I decided to do even a little bit more and this mean also implementing Chess960 variation.
And I guess I've added a lot of new bugs. :-(

So now, I'm not sure how I should publish it.

The engine is great, a lot of knowledge, strong play.
I don't like to "steal" it, rename it, put my name on it (make very little changes) and get a lot of honor about it, about this great engine.
On the other side, I don't like to keep Pawel's name in front, make a lot of changes, make it buggy and than otheres are thinking Pawel made bad code.

Maybe Pawel is reading this and will answer.
Of course, I shouldn't keep the name as it is.
To distinguish, I can name it for example "Rodent4BCM".
What about "id author"?
"Pawel" first, added by "with modifications by BCM"?
Or better more distant "BCM (based on Rodent 4 from Pawel)"?
Or maybe better a complete different name than rodent?
How to procede, to keep the great work of Pawel unsullied?

---

And here my current changes:

1) as told, added Chess960-support
The source need to be polished (before published). I'm sure, you would have implement it in a much better way - but it's working. ;-)
Also it must be tested a lot - unfortunately I have more fun in coding than in using it.
Maybe otheres are interest in (a buggy) chess960-variant? ;-)

2) my most important aim: pathes
Each GUI are copying the binary into it's own path, so rodent can't use relative pathes (at least not easy).
My modification checks a lot of pathes and takes the first existing one as "rodent-homedir".
Still I have to decide which one (suggestions?), but it's no problem if it will be a long list.
Currently it checks for "/sdcard/Rodent4" (also with lowercase "r" and also without "4") and also the same for "/sdcard/DroidFish/uci/Rodent4"
Than "personalities/basic.ini" is found and all things are very well (and uci Personality is combo).

3) Load default settings also from a file
So you can use it also with GUIs, which doesn't support engine-options.

4) uci-log functionality
I guess, this is only important for me. ;-)

5) Oh yeah, and a few fixes. ;-)
If I didn't miss anything, setoption was not working for KnightPair, RookPair, PrimaryPstWeight, SecondaryPstWeight, BookFilter, IsolatedOnOpenMg
And "stop" was not proper working in thingle-thread-build.

I guess, that's the main thing.

---

And I like to make proper personalities (of famous persons).
I've put all famous (also) in a libreoffice calc-sheet (tried attach a screenshot, but didn't work with filesize 151KB).
I took them from R4, I've converted them from R3 and took other (unfinished) I found.
Still there are a lot of lines unfilled (marked red).
Others are split to middle- and end-game, where I used the same value for both (marked yellow).

Unfortunately I can't make (finish) personalities of famous persons.
I can only search the internet, get general infos about playing style, but this would be by far too less information.
I HOPE (!!!) this can be done by the community, helping togehter and finaly players can confirm it's the right or (same important) wrong playing style.

Or maybe this would be a great task for the Google AI, reading all games of one famous person and create the personality. ;-)

---

Sorry, so much text - I hope I was not boring you, at least not too much. ;-)

User avatar
xr_a_y
Posts: 1338
Joined: Sat Nov 25, 2017 1:28 pm
Location: France

Re: Can nobody compile Roden IV?

Post by xr_a_y » Thu Mar 05, 2020 4:31 pm

shogi4fun wrote:
Thu Mar 05, 2020 3:56 pm
abik wrote:
Fri Feb 28, 2020 6:10 pm
xr_a_y wrote:
Thu Feb 27, 2020 9:50 am
but when used in chess for android it plays some move and then I see "engine resing"
I don't know how to debug this, is there log available somewhere when running chess for android, can you help me with this please ?
Do you mean "resign"? If this happens during a tournament, have a look at the saved PGN games. They contain more logging information on why the engine resigned (sometimes it is arbitration due to a illegal move). The engine works fine for me with some simple testing, but I will run a small tournament and see what happens.
Hi abik,

I can reproduce the bug, with CfA and also in terminal emulation.
It raises only if pondering is on.

Minic has problems when the stop- and the next command are sent too close together.
So for example first send:

Code: Select all

position startpos moves e2e4 e7e5 b1c3
go ponder movetime 1000
Than sending the following 2 lines together (for example copy'n'paste into terminal)

Code: Select all

stop
position startpos moves e2e4 e7e5 f2f4
Than you'll get an error "Trying to read bad move, not legal Position".

This was the easy one, the short post. ;-)
Thanks a lot for this debug input ! I'll try to analyze and fix this.

PK
Posts: 863
Joined: Mon Jan 15, 2007 10:23 am
Location: Warsza
Contact:

Re: Can nobody compile Roden IV?

Post by PK » Fri Mar 06, 2020 8:32 am

shogi4fun, I would be happy to have You as a co-author of Rodent IV, and even to consider Your branch a main one from now on. Feel free to publish source with Your changes on GitHub or GitLab, whichever You prefer. I might even add a thing or two in the future. From Your description it seems that You know what You are doing. Adding Chess960 is great, fixing bugs is great, the only thing I might quibble with is removing relative paths, as they are easier for the user. Perhaps adding a checkbox would be a solution.

As I stated before, currently I have no desire to be a main developer of Rodent. This is caused by two things: my current position in game developement and a feeling that I reached a limit of what I can do with Rodent. My day job includes tending to chess, checkers and mancala engines, and I don't feel like doing the same thing at home (except for a side project Brendan Norman mentioned).

It seems Rodent has outgrown the stage when it could be dealt with by a single developer. It has too many quirks, too many features, and messy code. At some stage I got help from a Russian guy going by the nickname tico-tico, including great enhancements to transposition table and absolute/relative paths, but modifying his code is difficult for me. Also, there are limitations to what I am able to do. I failed to make multithreaded code scale beyond 16 cores. I never compiled C code for Android. Massive changes in search from Rodent III brought next to nothing in terms of Elo. There is a discrepancy between node counts in debug and release compiles. In short, I am proud of Rodent as a chess entity, but not as a software engineering effort (not bad for someone who started as a literary historian, but definately not up to industry standards).

To make a long story short: please go ahead. Please publish Your changes and add Yourself as a co-author, not a modificator. Please retain the name to ensure project's continuity. The only special right I want to reserve for myself is that I want evaluation function changes consulted with me.

shogi4fun
Posts: 30
Joined: Thu Aug 26, 2010 3:32 pm

Re: Can nobody compile Roden IV?

Post by shogi4fun » Fri Mar 06, 2020 10:33 pm

Hi Pawel,
PK wrote:
Fri Mar 06, 2020 8:32 am
shogi4fun, I would be happy to have You as a co-author of Rodent IV, and even to consider Your branch a main one from now on...I might even add a thing or two in the future.
You are embarrassing me. :oops: :oops: :oops:
Thank you very much, for your great offer.

I'm feeling proud and your offer means, that I must rework my code very much and I should restart with your latest source all over again. A lot of much more work than I've thought. :roll:

And I would be very happy, if you took an eye on my changes, adding what you want and maybe improving my code.
PK wrote:
Fri Mar 06, 2020 8:32 am
From Your description it seems that You know what You are doing.
Oh, you think better about my abilities than I do. :lol:

Yes, I know about writing code and in general at least the result would be like I want.
But with implementing chess960 I was close to cry and resign.

Writing ability about chess960 seems not so difficulty (and even I've done it in an earlier project), but you know (better than me) that creating a strong engine it must be time-effective in it's iteration part.
While in standard chess, each move goes to a different square which is empty or an enemy piece, in 960 the king can "catch" itself or enter rook square. That needed a few corrections about the bitboards. But doing wrong things here will raise an error some times later. I almost got insane, till I found that there was an error also on other location, moving bits in my head.

By the way: I've read (or heard?) about bitboards in the past, but reading your code, I finaly got "inside" it. Interesting thing.
PK wrote:
Fri Mar 06, 2020 8:32 am
... the only thing I might quibble with is removing relative paths, as they are easier for the user.
Oh, what a big mistake.
I NEVER aiming removing relative pathes - I agree with you by 100%!!!
My target was to make them USEABLE, and (as told) that was the reason I've started coding it.

Absolute pathes were already possible, I haven't to do anything. I want to make relative pathes possible on android.

You've told, you never compiled for android. I don't know how much you know about android, so sorry if I tell you things you already know.

Here in detail:
in my opinion, android is a somewhat strange os, very strictly limited, even not allowing to backup data from your app (at least not easy).
Android don't allow to run programs directly from sdcard and each app has an own folder, only useable by itself.
So each GUI is copying the file from the sdcard to it's own folder.
The program will be run there, but there is no way to know, where the personality- and book-files are.
Of course it can find the files by absolut pathes, but I (as you, as almost all persons) prefere relative pathes, so nothing has to be configured.

To do so,
- rodent first checks, if "/sdcard/Rodent4" exists. If so, it's fine and the needed files can be found (relataive) there
- if not, rodent checks, if "/sdcard/DroidFish/uci/Rodent4" exists. If so, it's fine and the needed files can be found (relative) there

Oh, maybe I missed the following important thing in my post above:
- if also this (and maybe many other) folder don't exists, it uses the folder where the binary is.
This will not help on android, but works as before for windows, linux and what else builds.

Still I've one idea with oex which could be better, but than the GUIs must support it and maybe google will sometime make more restrictions to prevent this way.

---

So to the final things:

One information: unfortunately my multi-threading builds are not working (a long story - not to write here), but I guess, this can be done by others.
And for me (as I belive and also others): the focus on rodent are the personalities and playing against WEAKER styles of them
(And if I'm not wrong, multithreading is not used in analyze mode.)

I've very limited experience with GitHub, but it's fine to use it for rodent.
You've put Rodent3 (as Rodent2) to GitHub, but not Rodent4.
Maybe you like to put (Final)Rodent4 also there?
Would help me a little bit and also the current code would be "frozen" there, to keep history.
Than I'll make a fork of it and this will be the new main branch.
(As told, I'm not much experienced with GitHub, but I guess you can give me rights to your repository, or I give it to you ...)

Would this be okay for you?

---

And finaly a small question, what you prefere:
as others, I've also problems with wordexp.
To make it working, I've created an option-variable.
What default do you prefere?
It can be enabled by default and dissabled with "NO_WORDEXP" or dissabled by default and enabled with "USE_WORDEXP".
I guess, the later one would make it easier for others to compile (instead resigning when getting errors), but maybe they can wonder later, why something isn't working.

shogi4fun
Posts: 30
Joined: Thu Aug 26, 2010 3:32 pm

Re: Can nobody compile Roden IV?

Post by shogi4fun » Sat Mar 07, 2020 7:09 am

shogi4fun wrote:
Fri Mar 06, 2020 10:33 pm
(And if I'm not wrong, multithreading is not used in analyze mode.)
Oh, I WAS wrong, but (for my apologies) only partly. :wink:

I didn't pay attention to it, it was working in terminal mode, so I had to test it again.
=> with C4A it still worked great
=> but in DroidFish there are problems !!!

PK
Posts: 863
Joined: Mon Jan 15, 2007 10:23 am
Location: Warsza
Contact:

Re: Can nobody compile Roden IV?

Post by PK » Sat Mar 07, 2020 8:29 am

OK guys, Rodent IV is on GitHub: https://github.com/nescitus/rodent-iv

shogi4fun, what is Your nick on GitHub?

Post Reply