Cross compiling woes

Discussion of chess software programming and technical issues.

Moderator: Ras

User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: Cross compiling woes

Post by Evert »

I have updated the archive at http://www.eglebbk.dds.nl/program/downl ... 6M-win.zip with a binary of Sjaak that uses a hand-written software implementation to replace the exponential function (it also includes the test program I posted earlier, rewritten to use the same exponential function).

I would be interested in knowing whether this still crashes.
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: Cross compiling woes

Post by Evert »

I caved and decided to try my own exponential function. It's hard to find a suitable software implementation (at least using google) and none of my reference books were much help.

So I ended up writing a function that first brings x in the range [0,1] using a while loop (bleh) while accumulating the relevant integer powers of e, and then finally applies the 4/3 order Padé approximation as listed on Wikipedia. Seems to work decently enough for this...

Part of me still feels that I should be able to use standard library functions though...
Daniel Shawul
Posts: 4186
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Re: Cross compiling woes

Post by Daniel Shawul »

Both seem to run fine for me on windows 8 x64.
But sjaak seem to display some weird messages after new command with directories and all.
Test move flags in load_piece_evaluation_terms, line 604 of /home/eglebbk/Progra m/Sjaak/src/rules/game.c.
step in load_piece_evaluation_terms, line 606 of /home/eglebbk/Program/Sjaak/src /rules/game.c.
next in load_piece_evaluation_terms, line 616 of /home/eglebbk/Program/Sjaak/src /rules/game.c.
next in load_piece_evaluation_terms, line 637 of /home/eglebbk/Program/Sjaak/src /rules/game.c.
Set mobility weights in load_piece_evaluation_terms, line 652 of /home/eglebbk/P rogram/Sjaak/src/rules/game.c.
Clear evaluation weights in load_piece_evaluation_terms, line 569#[Chess] 0w>d
Illegal move: d
#[Chess] 0w>go
2 5 0 136 1. Nc3
3 9 1 864 1. e4 Nh6
4 4 1 1669 1. e4 Nf6 2. Nc3
5 10 2 2625 1. e4 Nh6 2. Bc4 Nc6
6 1 6 8406 1. e4 Nf6 2. Nc3 d5 3. Bb5 c6
7 5 18 30056 1. e3 e6 2. Bd3 Qf6 3. Nf3 Bd6
8 2 47 88338 1. d4 Nf6 2. Nf3 g6 3. d5 d6 4. Be3
9 8 78 139145 1. d4 e6 2. Nc3 Nh6 3. e3 f5 4. Nf3 Be7
10 3 204 352005 1. d4 e6 2. Nc3 Nh6 3. Nf3 Nc6 4. Be3 Be7 5. Qd2
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: Cross compiling woes

Post by Evert »

Thanks for testing and confirming things run without crashing! :)

The excessive output from Sjaak is because this is a debug build with overzealous trace output (including full path to the source file at the time of compilation) to help me pin-point where it crashed. Now that this seems to be resolved I'll pull those trace statements (completely; even in a debug build it's a bit much).