Hi,
I was running this against LuaJester the other day and the following position came about. Not sure if this formatting shows up but the key is that black king is on g8 and a white pawn on h6 (you can figure the rest from below).
Anyway, LuaJester does g3g4 and Sunfish responds with g8g7 putting king in check. Looks like it needs a small rule to avoid king going into check for completeness, although it's probably a minor thing under the circumstances.
. . . . . . k .
. . . . . . . .
R . . . . . . P
. . . . . . . .
. . . . . K . .
. . . . . . P .
. . . . . . . .
. . . . . . . .
Your move: g3g4
My move: g8g7
. . . . . . . .
. . . . . . k .
R . . . . . . P
. . . . . . . .
. . . . . K P .
. . . . . . . .
. . . . . . . .
. . . . . . . .
Your move:
SUNFISH - a new chess engine written in Python !
Moderator: Ras
-
- Posts: 4
- Joined: Sun Apr 20, 2014 3:24 pm
Re: Increasing the performances !
Just noticed ZirconiumX's amended version which doesn't get caught with this position!
Looks like the number of nodes it can check has been doubled to 20,000 in the code I wonder what the new elo would be?
When I ran it against LuaJester (with the earlier version of sunfish (10,000 nodes) that limits itself to 6 ply I think, it was taking about ten seconds per move so I think it had the advantage.
Looks like the number of nodes it can check has been doubled to 20,000 in the code I wonder what the new elo would be?
When I ran it against LuaJester (with the earlier version of sunfish (10,000 nodes) that limits itself to 6 ply I think, it was taking about ten seconds per move so I think it had the advantage.
-
- Posts: 4793
- Joined: Fri Apr 21, 2006 4:19 pm
- Location: IAȘI - the historical capital of MOLDOVA
- Full name: Silvian Rucsandescu
Re: Better !
Stormb wrote:Just noticed ZirconiumX's amended version which doesn't get caught with this position!
Looks like the number of nodes it can check has been doubled to 20,000 in the code I wonder what the new elo would be?
When I ran it against LuaJester (with the earlier version of sunfish (10,000 nodes) that limits itself to 6 ply I think, it was taking about ten seconds per move so I think it had the advantage.

https://github.com/ZirconiumX/sunfish
SilvianR

-
- Posts: 1346
- Joined: Sun Jul 17, 2011 11:14 am
- Full name: Hannah Ravensloft
Re: Increasing the performances !
Other way round, actually. Thomas Ahle halved the number of nodes Sunfish could search in a version after the one I forked.
I have better move ordering in this, but I think what really helps here is the fact that Sunfish actually knows what check is (previously, it avoided check by letting the king get captured, which created a score it ignored), though whether that actually means anything I do not know.
I am actually still working on this, but since my current attempts at Cython are failing, I might give up and go back to Python.
Matthew:out
I have better move ordering in this, but I think what really helps here is the fact that Sunfish actually knows what check is (previously, it avoided check by letting the king get captured, which created a score it ignored), though whether that actually means anything I do not know.
I am actually still working on this, but since my current attempts at Cython are failing, I might give up and go back to Python.
Matthew:out
tu ne cede malis, sed contra audentior ito
-
- Posts: 4
- Joined: Sun Apr 20, 2014 3:24 pm
Re: Increasing the performances !
Oh I see, thanks for the clarification. It's amazing to me what you've achieved in such a small amount of code - fascinating.
I look forward to seeing where you take it.
I look forward to seeing where you take it.
-
- Posts: 1346
- Joined: Sun Jul 17, 2011 11:14 am
- Full name: Hannah Ravensloft
Re: Increasing the performances !
I doubt very far. I'd be lucky to score 2000 Elo points.Stormb wrote:Oh I see, thanks for the clarification. It's amazing to me what you've achieved in such a small amount of code - fascinating.
I look forward to seeing where you take it.
Matthew:out
tu ne cede malis, sed contra audentior ito
-
- Posts: 4793
- Joined: Fri Apr 21, 2006 4:19 pm
- Location: IAȘI - the historical capital of MOLDOVA
- Full name: Silvian Rucsandescu
Re: Sunfish X logo
Being very fast I have already the new "old" archive !ZirconiumX wrote:I doubt very far. I'd be lucky to score 2000 Elo points.Stormb wrote:Oh I see, thanks for the clarification. It's amazing to me what you've achieved in such a small amount of code - fascinating.
I look forward to seeing where you take it.
Matthew:out

Here's my logo for this masterpiece in Python :

SilvianR

-
- Posts: 102
- Joined: Sun Sep 09, 2007 6:32 am
Re: Increasing the performances !
What are you trying and how is it failing? I have always been interested in Cython, but it seemed like I always ended up writing C-looking code in Python, so I didn't see the point.ZirconiumX wrote: I am actually still working on this, but since my current attempts at Cython are failing, I might give up and go back to Python.
-
- Posts: 782
- Joined: Wed Mar 08, 2006 9:22 pm
Re: Increasing the performances !
ZirconiumX wrote:
I doubt very far. I'd be lucky to score 2000 Elo points.
Matthew:out
Hello Matthew,
Amazing how you make achieving that feat sound like something you are apologizing for!
Later.
-
- Posts: 1346
- Joined: Sun Jul 17, 2011 11:14 am
- Full name: Hannah Ravensloft
Re: Increasing the performances !
So many posts to reply to!
Roger Brown: A doubling of speed on a program that is not optimised for speed is easy. It isn't much of a feat.
Russell Reagan: Just general optimisation. I have yet to find the magic code that doubles the speed. The main issue I'm having is how difficult it is to set up to compile.
Ruxy Sylwyka: Thanks for the logo! I actually privately named it "Moonfish".
The current incarnation of the code is attempting to be a multiprocess Monte Carlo search, but to no avail. I think I'll go back to my old code and restart my development efforts on the search I already have. I'd appreciate some CPU time if anyone is feeling willing.
Matthew:out
Roger Brown: A doubling of speed on a program that is not optimised for speed is easy. It isn't much of a feat.
Russell Reagan: Just general optimisation. I have yet to find the magic code that doubles the speed. The main issue I'm having is how difficult it is to set up to compile.
Ruxy Sylwyka: Thanks for the logo! I actually privately named it "Moonfish".
The current incarnation of the code is attempting to be a multiprocess Monte Carlo search, but to no avail. I think I'll go back to my old code and restart my development efforts on the search I already have. I'd appreciate some CPU time if anyone is feeling willing.
Matthew:out
tu ne cede malis, sed contra audentior ito