Ethereal - Official Release

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

Moderators: hgm, Rebel, chrisw

Daniel Anulliero
Posts: 759
Joined: Fri Jan 04, 2013 4:55 pm
Location: Nice

Re: Ethereal - Official Release

Post by Daniel Anulliero »

Missed your post
Congratulation for your release :wink:
User avatar
lucasart
Posts: 3232
Joined: Mon May 31, 2010 1:29 pm
Full name: lucasart

Re: Ethereal - Official Release

Post by lucasart »

AndrewGrant wrote:This is the official release for my engine Ethereal

Release can be found here : https://github.com/AndyGrant/Ethereal/r ... /tag/V7.58

This engine is original except for the PSQT values which were borrowed from Toga II.
It is heavily influenced by the following engines: Stockfish, Crafty, Fruit, Toga II, TSCP, MadChess. As well as posts that the authors of these engines have made in various forums.

Estimated Elo = 2275
Nice work!
Theory and practice sometimes clash. And when that happens, theory loses. Every single time.
AndrewGrant
Posts: 1777
Joined: Tue Apr 19, 2016 6:08 am
Location: U.S.A
Full name: Andrew Grant

Re: Ethereal - Official Release

Post by AndrewGrant »

Your fixes work under posix but not on windows. I have fixed it in my current version.

After your post I went on a massive bug hunt with every compiler warning I could find turned on. I managed to gain 175 Elo in the process. If you could provide a new binary, compiled from

https://github.com/AndyGrant/Ethereal/releases/tag/7.60

I would be very great-full.

Additionally, this is a UCI engine and I have no plans of adding xboard to it.

Thanks, Andrew Grant
#WeAreAllDraude #JusticeForDraude #RememberDraude #LeptirBigUltra
"Those who can't do, clone instead" - Eduard ( A real life friend, not this forum's Eduard )
User avatar
MikeB
Posts: 4889
Joined: Thu Mar 09, 2006 6:34 am
Location: Pen Argyl, Pennsylvania

Re: Ethereal - Official Release

Post by MikeB »

AndrewGrant wrote:
Additionally, this is a UCI engine and I have no plans of adding xboard to it.

Thanks, Andrew Grant
Almost all uci engines work under xboard with polyglot, even windows uci engines under wine. I'll turn turn on the logger and see what the issue is. On the mac, you have very nice nps, even in the starting position , 3.2M nps.
User avatar
MikeB
Posts: 4889
Joined: Thu Mar 09, 2006 6:34 am
Location: Pen Argyl, Pennsylvania

Re: Ethereal - Official Release

Post by MikeB »

MikeB wrote:
AndrewGrant wrote:
Additionally, this is a UCI engine and I have no plans of adding xboard to it.

Thanks, Andrew Grant
Almost all uci engines work under xboard with polyglot, even windows uci engines under wine. I'll turn turn on the logger and see what the issue is. On the mac, you have very nice nps, even in the starting position , 3.2M nps.
The engine is not responding to uci commands :

uci command :
go wtime 10000 btime 10000 winc 1000 binc 1000

Code: Select all

For example with SF:

go wtime 10000 btime 10000 winc 1000 binc 1000
info depth 1 seldepth 1 multipv 1 score cp 75 nodes 20 nps 20000 tbhits 0 time 1 pv e2e4
info depth 2 seldepth 2 multipv 1 score cp 80 nodes 55 nps 55000 tbhits 0 time 1 pv e2e4 b7b6
info depth 3 seldepth 3 multipv 1 score cp 97 nodes 141 nps 70500 tbhits 0 time 2 pv d2d4 d7d6 e2e4
info depth 4 seldepth 4 multipv 1 score cp 92 nodes 237 nps 118500 tbhits 0 time 2 pv d2d4 e7e6 e2e4 d7d6
info depth 5 seldepth 5 multipv 1 score cp 54 nodes 1668 nps 333600 tbhits 0 time 5 pv e2e4 d7d5 e4e5 e7e6 d2d4
info depth 6 seldepth 6 multipv 1 score cp 0 nodes 5266 nps 478727 tbhits 0 time 11 pv b1c3 d7d5 d2d4 g8f6 e2e3 e7e6
info depth 7 seldepth 9 multipv 1 score cp 30 nodes 6853 nps 527153 tbhits 0 time 13 pv e2e4 d7d5 e4d5 d8d5 d1e2 b8c6 b1c3
info depth 8 seldepth 9 multipv 1 score cp 23 nodes 11693 nps 649611 tbhits 0 time 18 pv e2e4 e7e5 g1f3 b8c6 b1c3 f8c5 d2d3 g8f6
info depth 9 seldepth 12 multipv 1 score cp 29 nodes 17941 nps 780043 tbhits 0 time 23 pv e2e4 d7d5 e4d5 d8d5 b1c3 d5e6 d1e2 e6f5 g1f3 g8f6
info depth 10 seldepth 14 multipv 1 score cp 48 nodes 42881 nps 1099512 tbhits 0 time 39 pv e2e4 d7d5 e4d5 g8f6 c2c4 e7e6 d1e2 c7c6 d5e6 c8e6 g1f3
info depth 11 seldepth 17 multipv 1 score cp 46 nodes 85014 nps 1307907 tbhits 0 time 65 pv e2e4 e7e5 g1f3 b8c6 b1c3 g8f6 f1c4 f8b4 c3d5 f6e4 e1g1 e8g8
info depth 12 seldepth 18 multipv 1 score cp 35 nodes 167482 nps 1419338 tbhits 0 time 118 pv e2e4 e7e6 d2d4 d7d5 b1c3 d5e4 c3e4 d8d5 d1e2 e6e5 g1f3 e5d4
info depth 13 seldepth 18 multipv 1 score cp 38 nodes 249073 nps 1482577 tbhits 0 time 168 pv e2e4 e7e6 d2d4 d7d5 b1c3 b8c6 g1f3 f8b4 e4e5 g8e7 f1b5 c8d7 e1g1 e8g8
info depth 14 seldepth 19 multipv 1 score cp 26 nodes 518585 nps 1566722 tbhits 0 time 331 pv e2e4 e7e6 g1f3 d7d5 e4d5 e6d5 d1e2 d8e7 b1c3 g8f6 d2d4 b8c6 e2e7 f8e7 c1f4 c8f5 e1c1
info depth 15 seldepth 24 multipv 1 score cp 31 nodes 668583 nps 1588083 tbhits 0 time 421 pv e2e4 e7e6 b1c3 d7d5 d2d4 b8c6 g1f3 f8b4 e4e5 g8e7 f1b5 a7a6 b5d3 b4c3 b2c3
info depth 16 seldepth 24 multipv 1 score cp 21 nodes 1336706 nps 1600845 tbhits 0 time 835 pv e2e4 e7e6 g1f3 d7d5 e4d5 e6d5 d2d4 g8f6 f1d3 f8e7 c1d2 e8g8 e1g1 b8c6 f1e1 c8g4 b1c3
bestmove e2e4 ponder e7e6


Your engine  just keeps going:

go wtime 10000 btime 10000 winc 1000 binc 1000
info depth 1 score cp 51 time 29 nodes 23 hashfull 565 pv d2d4
info depth 2 score cp 5 time 29 nodes 87 hashfull 565 pv d2d4
info depth 3 score cp 35 time 36 nodes 209 hashfull 565 pv d2d4
info depth 4 score cp 11 time 243 nodes 1604 hashfull 565 pv e2e4
info depth 5 score cp 35 time 405 nodes 4633 hashfull 565 pv e2e4
info depth 6 score cp 27 time 582 nodes 11924 hashfull 565 pv c2c4
info depth 7 score cp 30 time 635 nodes 33987 hashfull 565 pv e2e4
info depth 8 score cp 22 time 727 nodes 82036 hashfull 565 pv e2e4
info depth 9 score cp 31 time 797 nodes 132748 hashfull 565 pv e2e4
info depth 10 score cp 24 time 1002 nodes 389077 hashfull 566 pv e2e4
info depth 11 score cp 27 time 1252 nodes 882078 hashfull 568 pv e2e4
info depth 12 score cp 21 time 1730 nodes 1923188 hashfull 572 pv e2e4
info depth 13 score cp 31 time 3841 nodes 6443234 hashfull 592 pv e2e4
info depth 14 score cp 21 time 5751 nodes 10614728 hashfull 608 pv e2e4
info depth 15 score cp 31 time 12166 nodes 24338436 hashfull 662 pv e2e4
info depth 16 score cp 11 time 64147 nodes 207412388 hashfull 902 pv c2c4
info depth 17 score cp 30 time 132210 nodes 426093431 hashfull 997 pv f2f4
info depth 18 score cp 11 time 306979 nodes 989536128 hashfull 999 pv c2c4
AndrewGrant
Posts: 1777
Joined: Tue Apr 19, 2016 6:08 am
Location: U.S.A
Full name: Andrew Grant

Re: Ethereal - Official Release

Post by AndrewGrant »

That issue is fixed with the latest version, 7.60

https://github.com/AndyGrant/Ethereal/releases/tag/7.60
#WeAreAllDraude #JusticeForDraude #RememberDraude #LeptirBigUltra
"Those who can't do, clone instead" - Eduard ( A real life friend, not this forum's Eduard )
User avatar
MikeB
Posts: 4889
Joined: Thu Mar 09, 2006 6:34 am
Location: Pen Argyl, Pennsylvania

Re: Ethereal - Official Release

Post by MikeB »

AndrewGrant wrote:That issue is fixed with the latest version, 7.60

https://github.com/AndyGrant/Ethereal/releases/tag/7.60
Very nice, now over 3.5M nps from starting position:

Code: Select all

go depth 18
info depth 1 score cp 39 time 1 nodes 25 hashfull 0 pv b1c3
info depth 2 score cp 9 time 2 nodes 110 hashfull 0 pv b1c3
info depth 3 score cp 39 time 3 nodes 256 hashfull 0 pv b1c3
info depth 4 score cp 9 time 4 nodes 954 hashfull 0 pv b1c3
info depth 5 score cp 9 time 5 nodes 2593 hashfull 0 pv b1c3
info depth 6 score cp 9 time 10 nodes 7774 hashfull 0 pv b1c3
info depth 7 score cp 24 time 12 nodes 10675 hashfull 0 pv b1c3
info depth 8 score cp 9 time 26 nodes 31467 hashfull 0 pv b1c3
info depth 9 score cp 17 time 42 nodes 57011 hashfull 0 pv b1c3
info depth 10 score cp 9 time 100 nodes 166271 hashfull 1 pv b1c3
info depth 11 score cp 25 time 220 nodes 502261 hashfull 3 pv g1f3
info depth 12 score cp 10 time 419 nodes 1183975 hashfull 7 pv g1f3
info depth 13 score cp 15 time 570 nodes 1723311 hashfull 11 pv g1f3
info depth 14 score cp 11 time 1495 nodes 5049116 hashfull 31 pv g1f3
info depth 15 score cp 13 time 2206 nodes 7629123 hashfull 46 pv g1f3
info depth 16 score cp 14 time 6859 nodes 24424585 hashfull 142 pv e2e4
info depth 17 score cp 14 time 11929 nodes 42569020 hashfull 246 pv e2e4
info depth 18 score cp 16 time 19632 nodes 70339224 hashfull 386 pv e2e4
Updated link for the Mac exe:
https://www.dropbox.com/s/utxm1m49nnbdf ... 0.zip?dl=1

A quick game with no book just to make sure it plays ok

[pgn][Event "Computer Chess Game"]
[Site "Mac-Pro.local"]
[Date "2016.06.26"]
[Round "-"]
[White "Ethereal"]
[Black "Mikhail 0.04 OSx 64"]
[Result "0-1"]
[TimeControl "60+1"]
[Annotator "1. +0.17 1... -0.11"]

1. Nc3 {+0.17/13} e5 {-0.11/18 4} 2. d3 {+0.14/14 1.9} Nc6 {+0.16/16 0.9}
3. f4 {+0.14/13 1.0} d5 {+0.20/18 5} 4. fxe5 {+0.17/14 1.6} Nxe5
{+0.20/17 1.4} 5. e3 {+0.14/14 2.2} c6 {+0.47/17 4} 6. Be2 {+0.13/13 1.4}
Bd6 {+0.52/15 0.5} 7. Nf3 {+0.05/14 1.3} Nf6 {+0.57/15 0.5} 8. Nxe5
{+0.09/15 1.6} Bxe5 {+0.58/18 2.7} 9. d4 {+0.05/15 1.6} Bc7 {+0.81/17 0.5}
10. O-O {+0.13/14 1.5} Qd6 {+0.79/16 0.5} 11. g3 {+0.03/14 0.9} O-O
{+0.80/16 0.5} 12. Bd2 {+0.00/13 2.2} Bh3 {+0.77/17 5} 13. Rf2
{-0.02/13 1.3} Rae8 {+0.75/16 6} 14. Qe1 {-0.03/12 1.0} a5 {+0.80/15 4} 15.
Bd3 {-0.08/11 1.1} h5 {+0.90/16 7} 16. Qe2 {-0.08/11 1.3} Re6 {+0.95/16 4}
17. Bf5 {-0.15/13 1.2} Bxf5 {+0.78/17 2.1} 18. Rxf5 {-0.12/14 1.4} h4
{+0.82/18 1.0} 19. gxh4 {-0.13/13 1.5} Ng4 {+0.92/17 1.4} 20. Nd1
{-0.15/14 1.7} Nxh2 {+2.02/16 3} 21. Bxa5 {-0.14/14 1.0} Rg6+
{+2.02/14 0.2} 22. Rg5 {-0.28/16 1.3} b6 {+2.43/15 0.5} 23. Bc3
{-0.62/14 1.2} Qf6 {+3.60/14 1.1} 24. Kg2 {-1.46/15 1.1} Rxg5+
{+3.04/11 0.1} 25. hxg5 {-2.06/15 1.0} Qxg5+ {+4.30/13 0.3} 26. Kh1
{-160.00/16 2.7} Re8 {+4.30/12 0.1} 27. Bb4 {-4.58/14 2.6} Qh6
{+13.53/16 4} 28. Kg2 {-160.00/15 2.6} Re6 {+17.82/13 1.7} 29. Qb5
{-160.00/16 2.5} Qh4 {+1000.05/20 1.9} 30. Nf2 {-18.09/12 1.9} Rg6+
{+1000.03/20 0.5} 31. Ng4 {-159.96/22 1.3} Rxg4+ {+1000.02/21 0.6} 32. Kh1
{-159.98/24 1.2} Nf1# {+1000.01/128 0.1}
{Black mates} 0-1[/pgn]

I also performed a quick test under xboard to start analysis, then quit xboard without stopping the engine to see if it exits properly ( common problem with Mac engines ), happy to report it did so. It compiled cleanly using pgo. Your engine is much faster using the icc complier then gcc (both are for the mac). That varies by engine, as an example SF is faster using gcc.
User avatar
MikeB
Posts: 4889
Joined: Thu Mar 09, 2006 6:34 am
Location: Pen Argyl, Pennsylvania

Re: Ethereal - Official Release

Post by MikeB »

This is the custom makefile created to compile for the mac:

Code: Select all

#!/bin/bash

mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST)))
current_dir := $(notdir $(patsubst %/,%,$(dir $(mkfile_path))))
EXE= $(current_dir:.d=)

DEFINES=-DUSE_POPCNT -DBENCH -DAPPLE -DINTEL_COMPILER -DNDEBUG -DHAVE_STRUCT_TIMESPEC 
CC=gcc-mp-4.8
ICC=icc
OBJECTS=src/*.c
CXFLAGS-GP= $(DEFINES) -std=c99 -pthread -O3 -march=corei7 -msse4.2 --param max-inline-insns-auto=600 --param inline-min-speedup=5 -funsafe-loop-optimizations -funroll-loops  -pthread -fprofile-generate
CXFLAGS-GR= $(DEFINES) -std=c99 -pthread -O3 -march=corei7 -msse4.2 --param max-inline-insns-auto=600 --param inline-min-speedup=5  -funsafe-loop-optimizations -funroll-loops  -pthread -fprofile-use -fprofile-correction
CXFLAGS-IP= $(DEFINES) -Wall --param max-inline-insns-auto=100 --param inline-min-speedup=25 -march=corei7 -xSSE4.2 -finline-functions  -funroll-loops  -pthread -prof_gen
CXFLAGS-IR= $(DEFINES) -std=c99  --param max-inline-insns-auto=100 --param inline-min-speedup=25 -ipo -march=corei7 -xSSE4.2 -finline-functions  -funroll-loops  -pthread -prof_use
STRIP=strip


clean:
	rm -f src/*.o *.gcda *.gcno *.dyn

g-pro:
	rm -f src/*.o *.dyn *.gcda *.gcno
	$(CC) $(CXFLAGS-GP) $(OBJECTS) -o $(EXE)

g-rel:
	rm -f src/*.o
	$(CC) $(CXFLAGS-GR) $(OBJECTS) -o $(EXE)
	$(STRIP) $(EXE)
	/Applications/Upx/upx2 --lzma $(EXE)

i-pro:
	rm -f src/*.o *.dyn *.gcda *.gcno
	$(ICC) $(CXFLAGS-IP) $(OBJECTS) -o $(EXE)

i-rel:
	$(ICC) $(CXFLAGS-IR) $(OBJECTS) -o $(EXE)
	$(STRIP) $(EXE)
	/Applications/Upx/upx2 --lzma $(EXE)
Notes on the make file:
I always name the directory engine-ver.d -> Ethereal-7.60.d.
The first three lines takes the directory name , strips the "dot"d (.d) and assigns that as the exe name.

The defines (DEFINEs) here are copied from another makefile, they don;t hurt here , so i just left them.

For my mac, I need to specifically ID the gcc version that I want to use. Apple OS X upgrade workaround (PITA).

Gcc and icc share some options and others are not ( another PITA) . "GP" is to make the gcc profile version, "IP" makes the icc profile version. I generally just run the exe with go depth 15 ( I generally pick depth 3 to 4 seconds, anything longer tends to create a slower exe). I then build the release version using "GR" or "IR
. .

To summarize and to show how an example at the command line using icc:

Code: Select all

i-pro
run exe - go depth 13.
i-rel
( Note: I know you know how to build your own program, these are just notes for anyone with mac who would like to give it a try.)

Edit - upx is simply a compressor for mac exe - does not slow down the the exe at all.
User avatar
emadsen
Posts: 434
Joined: Thu Apr 26, 2012 1:51 am
Location: Oak Park, IL, USA
Full name: Erik Madsen

Re: Ethereal - Official Release

Post by emadsen »

It is heavily influenced by the following engines: Stockfish, Crafty, Fruit, Toga II, TSCP, MadChess.
Congrats Andrew and welcome to computer chess programming! I'll download your engine and run some games, see how it plays.

I'm glad to know you were able to learn something from my MadChess source code. Have you written any C# code before? Or is the C# syntax familiar enough to C that you could easily understand it?
My C# chess engine: https://www.madchess.net
AndrewGrant
Posts: 1777
Joined: Tue Apr 19, 2016 6:08 am
Location: U.S.A
Full name: Andrew Grant

Re: Ethereal - Official Release

Post by AndrewGrant »

I learned Java in school and C in my chess development. To me, C# Looks like a hybrid of the two.

I'm sure you've gotten his comment before, but I really liked the tables you post after each update to MadChess which show what you have changed, and how much Elo it was worth to you.

I also really liked how you were testing versions of your engine. Testing a few hundred games vs a dozen opponents is no novel idea, but I had not seen it in action. I now play thousands of games spread across a few engines (yours included!) to test my changes.

I outperform MadChess at short time controls, but the longer the Time Controls get the more balanced our two engines become.
#WeAreAllDraude #JusticeForDraude #RememberDraude #LeptirBigUltra
"Those who can't do, clone instead" - Eduard ( A real life friend, not this forum's Eduard )