You could just put that stuff into static eval.Henk wrote:No Skipper has not the right data structures.
Improving speed
Moderators: hgm, Rebel, chrisw
-
- Posts: 2487
- Joined: Tue Aug 30, 2016 8:19 pm
- Full name: Rasmus Althoff
Re: Improving speed
-
- Posts: 7218
- Joined: Mon May 27, 2013 10:31 am
Re: Improving speed
After changing at least 500 lines of code looks like my engine is 5-10 percent faster. So my original data structure wasn't that bad after all.
Been busy all day doing all kinds of stupid edits. Not much fun.
Been busy all day doing all kinds of stupid edits. Not much fun.
-
- Posts: 759
- Joined: Fri Jan 04, 2013 4:55 pm
- Location: Nice
Re: Improving speed
Sven Schüle wrote:Your goal must be to reach a rating above 2200. If I assume a current rating for Skipper in the range of 1700-1800 (just a wild guess) then you can't reach that goal only by making your engine faster. "Factor two" would be about +70 .. +100 Elo points for you, I would consider all energy as wasted that you put into improving speed at that stage of the engine. So you need to improve your search and eval, and this starts at fixing (a lot of) bugs and nowhere else.Henk wrote:What I understood is that there are engines that are five times faster than Fairy-max. That means I should be able to get 3.5 million NPS. I already demolished my code to get a speed of 1.4 million NPS on my machine. So there is still room for improvement. Factor two would be nice.
In the game Jumbo vs. Skipper on last Sunday at the HGM online blitz tourney, Skipper played 8...a5 after 6...a6 and 7...b6, that *is* a bug (probably in the eval) and you have to fix it. In move 25 Skipper played Rxa2?? which loses the rook (or queen vs rook, as in the game) in very few plies (after Re1 Qd5 Qb3 the rook has no safe square). A program must see a simple loss of material in five plies, even in blitz. *That* is where you need to investigate first, not NPS, LMR, mating the bare king or WTF
Isa download :
-
- Posts: 7218
- Joined: Mon May 27, 2013 10:31 am
Re: Improving speed
That wasn't a bug. That was done deliberately. Because eval consumes CPU time and I was focusing on speed only. Just an experiment.Daniel Anulliero wrote:Sven Schüle wrote:Your goal must be to reach a rating above 2200. If I assume a current rating for Skipper in the range of 1700-1800 (just a wild guess) then you can't reach that goal only by making your engine faster. "Factor two" would be about +70 .. +100 Elo points for you, I would consider all energy as wasted that you put into improving speed at that stage of the engine. So you need to improve your search and eval, and this starts at fixing (a lot of) bugs and nowhere else.Henk wrote:What I understood is that there are engines that are five times faster than Fairy-max. That means I should be able to get 3.5 million NPS. I already demolished my code to get a speed of 1.4 million NPS on my machine. So there is still room for improvement. Factor two would be nice.
In the game Jumbo vs. Skipper on last Sunday at the HGM online blitz tourney, Skipper played 8...a5 after 6...a6 and 7...b6, that *is* a bug (probably in the eval) and you have to fix it. In move 25 Skipper played Rxa2?? which loses the rook (or queen vs rook, as in the game) in very few plies (after Re1 Qd5 Qb3 the rook has no safe square). A program must see a simple loss of material in five plies, even in blitz. *That* is where you need to investigate first, not NPS, LMR, mating the bare king or WTF
[Don't know yet about Rxa2?? Probably LMR reduction.]
-
- Posts: 759
- Joined: Fri Jan 04, 2013 4:55 pm
- Location: Nice
Re: Improving speed
Ok
Again , the conclusion is , after reading all the topic , Mr Henk NEVER listen advices . Pff ... answering to this guy is a waste of time ... everytime I say to myself "dont answer , not useful, he just do what he want ..." and every time , I write some things lol
Poor Skipper ...
Again , the conclusion is , after reading all the topic , Mr Henk NEVER listen advices . Pff ... answering to this guy is a waste of time ... everytime I say to myself "dont answer , not useful, he just do what he want ..." and every time , I write some things lol
Poor Skipper ...
Isa download :
-
- Posts: 433
- Joined: Fri Dec 16, 2016 11:04 am
- Location: France
- Full name: Richard Delorme
Re: Improving speed
I released a downsized version of Amoeba:
https://github.com/abulmo/Dumb/releases/tag/1.0
with almost no knowledge (just material & positional) and very basic search techniques: hash table, pvs/negascout, aspiration windows, iid, quiescence search, null move, check extension and that's it.
If your program is much weaker than this Dumb engine, there are probably bugs in your code, or very poor implementations of some algorithms.
https://github.com/abulmo/Dumb/releases/tag/1.0
with almost no knowledge (just material & positional) and very basic search techniques: hash table, pvs/negascout, aspiration windows, iid, quiescence search, null move, check extension and that's it.
If your program is much weaker than this Dumb engine, there are probably bugs in your code, or very poor implementations of some algorithms.
Richard Delorme
-
- Posts: 7218
- Joined: Mon May 27, 2013 10:31 am
Re: Improving speed
Speed first. First I have to fix the speed bugs.
-
- Posts: 737
- Joined: Wed Mar 08, 2006 8:08 pm
- Location: Orange County California
- Full name: Stuart Cracraft
Re: Improving speed
I finished some coding about 10 years ago and let it be for the intervening time. When I came back to it, on faster hardware, with the gap, and made a few obvious changes (simplification, and other tweaks), the result is good. I think I'll mothball it for another ten years.
-
- Posts: 759
- Joined: Fri Jan 04, 2013 4:55 pm
- Location: Nice
Re: Improving speed
Thanks for sharing Richard ! I'll try it vs my last version of Isaabulmo2 wrote:I released a downsized version of Amoeba:
https://github.com/abulmo/Dumb/releases/tag/1.0
with almost no knowledge (just material & positional) and very basic search techniques: hash table, pvs/negascout, aspiration windows, iid, quiescence search, null move, check extension and that's it.
If your program is much weaker than this Dumb engine, there are probably bugs in your code, or very poor implementations of some algorithms.
And Mr "Speed" Henk must try it vs Skipper ... or new name ? Speeder ?
Isa download :
-
- Posts: 7218
- Joined: Mon May 27, 2013 10:31 am
Re: Improving speed
I removed occupier property from my Field or Square class. So now it is bit board only. Very handy for debugging (not). Again I had to change about 400 lines of code.
And guess what speed is 10-20% slower. But at least I know it was not causing the speed bug.
And guess what speed is 10-20% slower. But at least I know it was not causing the speed bug.