New engine - Andscacs

Discussion of chess software programming and technical issues.

Moderators: hgm, Harvey Williamson, bob

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
User avatar
cdani
Posts: 2095
Joined: Sat Jan 18, 2014 9:24 am
Location: Andorra
Contact:

New engine - Andscacs

Post by cdani » Thu Feb 06, 2014 12:09 pm

Hi! I'm Daniel José. First sorry if my English is not good enough :-).
I made a new UCI engine called Andscacs (from Andorra, a little country between Spain and France), and Escacs, the catalan word for chess.
The website is http://www.andscacs.com, where you can download for free.

It's in alpha stage of developement.

It will only work with 64 bit Windows. Also requires a Cpu with support for POPCNT instruction.

First I wish to thank many people that publish information about chess engines programming in Internet, especially http://chessprogramming.wikispaces.com/! And also TalkChess.com, sure.
Also make special mention of open source modules that are very instructive, as for example Stockfish, Crafty, Protector, Discocheck, Gull...

This program is original and not based on any other, but obviously uses known techniques and others on my own. Uses an alpha-beta algorithm with many enhancements to speed performance. It's not multiprocessor capable.
Non-exhaustive list in no particular order of these techniques:

* Aspiration window.
* Tapered eval.
* Check extension.
* Razoring.
* Adaptive null move pruning.
* Principal variation search.
* Killer moves.
* Reduce other moves than winning one.
* LMR late move reduction.
* Internal iterative deepening.
* Hash with age.
* SEE Static exchange evaluation (without xray for the moment).
* Singular extension search.

It generates always all the possible moves in any position that analyzes. Uses bitboards for speed-up of many calculations, but not magic bitboards. For example mantanis a complete list of attacks of any piece.

For static evaluation it uses a lot of parameters, a lot more than 100, which can be summarized in:

* Piece-square tables, for middlegame and endgame.
* King safety.
* Valoration of pieces over a lot of different types of positions (opened positions, attack, weak points, etc.).
* Different types of piece mobility.
* Material imbalance.
* Value of passed pawns in different situations.
* Initiative bonus.

It has a lot of things to improve, new techniques to implement, parameters to be optimized, algorithms to ve improved...

May be someone wants to test it or play a tournament and put it in a list of rankings. I will be very glad of knowing about it. I think is stable enough.

This program is not mature yet, and plays a lot better certain type of positions than others. It's born in September 2013. It has approximately more than 2.400 elo.

Any advice is welcomed!

Thanks!!

User avatar
velmarin
Posts: 1580
Joined: Mon Feb 21, 2011 8:48 am

Re: New engine - Andscacs

Post by velmarin » Thu Feb 06, 2014 12:24 pm

Gracias Daniel Jose.

2400 Elo no está nada mal.
Por que solo esta versión? 64 popcnt.

Mucha suerte desde La Rioja.

User avatar
cdani
Posts: 2095
Joined: Sat Jan 18, 2014 9:24 am
Location: Andorra
Contact:

Re: New engine - Andscacs

Post by cdani » Thu Feb 06, 2014 2:26 pm

¡Hola!
Gracias por contestar. También soy admirador de Bouquet :-).
¿Te importa que conteste en inglés? Así puede participar más gente. A parte me da un poco de corte, puesto que todo el foro está en inglés.

So the question is why only 64 bits popcnt. Simply because I don't spent time on understanding how to implement 32 bits or popcnt alternative in c++ and make it compatible with the program. For sure is in the list of things to be done.

If you see the source code, now is a big mess of catalan/english things, commented code, non optimized, not well writed algorithms...

Every feature I know about I try to implement on the program. Then I do some quick optimizations and if it doesn't lose a lot of ranking I keep in the code, just to be optimized later.

For example the static eval was a lot of static arrays of numbers selected only by inspiration, of about everything I can think about: passed pawns, knight attack, pawn structure, mobility, king safety, etc.

The process I used to optimize a lot all those 200+ parameters at once in only some hours may be is of interest of someone.
First I do a static evaluation of something like 750.000 positions with Stockfish and the positions and the evals (not detailed evals, only the final number) get written to a txt file.
Then I evaluate with my program every position and I do a standard deviation of the evaluations of the two programs. I discard the extreme evaluations of Stockfish (more than 5 or -5).
Then I modify the first of the 200 parameters by one, for example the knight value from 290 to 291. I do again the standard deviation, and if is greater I try passing the knight value from 290 to 289. And so on with every parameter. If a value doesn't moves up or down, I keep it for changing again for 3 rounds, and then I try again because many times it changes again when some other values had changed.

So with this system the program won more than 100 elo very quickly. This obviously is only plausible for underoptimized programs.

Once "stockfished", it doesn't plays like Stockfish. There are so many different things that it's not a true risk. And then I changed many other thinks and the code always was absolutely different.

The easy conclusion of my last 5 months programming this in some spare hours, is that there is so many information available, that today is near trivial doing a 2200+ engine, and with not much work a more stronger one.

I know now it will be a lot more difficult to advance. But it's nice work!

User avatar
Ajedrecista
Posts: 1373
Joined: Wed Jul 13, 2011 7:04 pm
Location: Madrid, Spain.
Contact:

Re: New engine - Andscacs.

Post by Ajedrecista » Thu Feb 06, 2014 5:14 pm

Hello:
cdani wrote:Hi! I'm Daniel José. First sorry if my English is not good enough :-).
I made a new UCI engine called Andscacs (from Andorra, a little country between Spain and France), and Escacs, the catalan word for chess.
The website is http://www.andscacs.com, where you can download for free.

It's in alpha stage of developement.

It will only work with 64 bit Windows. Also requires a Cpu with support for POPCNT instruction.

First I wish to thank many people that publish information about chess engines programming in Internet, especially http://chessprogramming.wikispaces.com/! And also TalkChess.com, sure.
Also make special mention of open source modules that are very instructive, as for example Stockfish, Crafty, Protector, Discocheck, Gull...

This program is original and not based on any other, but obviously uses known techniques and others on my own. Uses an alpha-beta algorithm with many enhancements to speed performance. It's not multiprocessor capable.
Non-exhaustive list in no particular order of these techniques:

* Aspiration window.
* Tapered eval.
* Check extension.
* Razoring.
* Adaptive null move pruning.
* Principal variation search.
* Killer moves.
* Reduce other moves than winning one.
* LMR late move reduction.
* Internal iterative deepening.
* Hash with age.
* SEE Static exchange evaluation (without xray for the moment).
* Singular extension search.

It generates always all the possible moves in any position that analyzes. Uses bitboards for speed-up of many calculations, but not magic bitboards. For example mantanis a complete list of attacks of any piece.

For static evaluation it uses a lot of parameters, a lot more than 100, which can be summarized in:

* Piece-square tables, for middlegame and endgame.
* King safety.
* Valoration of pieces over a lot of different types of positions (opened positions, attack, weak points, etc.).
* Different types of piece mobility.
* Material imbalance.
* Value of passed pawns in different situations.
* Initiative bonus.

It has a lot of things to improve, new techniques to implement, parameters to be optimized, algorithms to be improved...

Maybe someone wants to test it or play a tournament and put it in a list of rankings. I will be very glad of knowing about it. I think it is stable enough.

This program is not mature yet, and plays a lot better certain type of positions than others. It's born in September 2013. It has approximately more than 2.400 elo.

Any advice is welcomed!

Thanks!!
Welcome to the forum! Just a tip when releasing an engine: it is better to announce it at the General Topics subforum... more people will see it, including testers, so there are two choices: create a new topic in the general subforum or wait that an admin will move this thread there if you agree.

I have a question: 2400 Elo according to what reference? I mean: this 2400 is comparable to 2400 CCRL or 2400 CEGT? If that, your engine can be tested without problems in both rating lists.

Congratulations and good luck!

Regards from Spain.

Ajedrecista.

User avatar
cdani
Posts: 2095
Joined: Sat Jan 18, 2014 9:24 am
Location: Andorra
Contact:

Re: New engine - Andscacs.

Post by cdani » Thu Feb 06, 2014 5:24 pm

Aha! So what the admins want about the post.
The 2400 is only a very basic idea I have about it after some thousands games played. I think it can be better than this, but may be my findings are biased. What can I do to be in these ratings you say?
Thanks.

User avatar
Graham Banks
Posts: 31909
Joined: Sun Feb 26, 2006 9:52 am
Location: Auckland, NZ

Re: New engine - Andscacs.

Post by Graham Banks » Thu Feb 06, 2014 5:29 pm

cdani wrote:Aha! So what the admins want about the post.
The 2400 is only a very basic idea I have about it after some thousands games played. I think it can be better than this, but may be my findings are biased. What can I do to be in these ratings you say?
Thanks.
A non-popcount version would also be useful. :wink:
My email addresses:
gbanksnz at gmail.com
gbanksnz at yahoo.co.nz

User avatar
Ajedrecista
Posts: 1373
Joined: Wed Jul 13, 2011 7:04 pm
Location: Madrid, Spain.
Contact:

Re: New engine - Andscacs.

Post by Ajedrecista » Thu Feb 06, 2014 5:47 pm

Hi again:
cdani wrote:Aha! So what the admins want about the post.
The 2400 is only a very basic idea I have about it after some thousands games played. I think it can be better than this, but may be my findings are biased. What can I do to be in these ratings you say?
Thanks.
You have done the most difficult thing: writting an engine that plays legal chess. The rest is easy: you release the engine (you have done it) and testers can download it and test it in their computers. You only have to wait until they come with the results.

Graham asks for a non-popcount version because testers have a variety of computers and not all of them can run popcnt versions (please Graham correct me if I am wrong). Graham himself is a tester of CCRL list, so I guess he is interested in testing Andscacs... it is a matter of time (few weeks) that you can view your engine inside rating lists (mainly CCRL and CEGT given the strength of your engine).

Regards from Spain.

Ajedrecista.

User avatar
cdani
Posts: 2095
Joined: Sat Jan 18, 2014 9:24 am
Location: Andorra
Contact:

Re: New engine - Andscacs.

Post by cdani » Thu Feb 06, 2014 6:12 pm

So if two people tells about the Popcnt thing, is that it's a must! :-)
So it's done! In the zip file now you will find a version "n" without the popcnt requirement.
Do you know if the instructions _BitScanForward64 and _BitScanReverse64 has problems also? I think no and that all the 64 bit cpu has it, but I'm not sure. I tell this because my program uses them.
Thanks for all.

Gerd Isenberg
Posts: 2111
Joined: Wed Mar 08, 2006 7:47 pm
Location: Hattingen, Germany

Re: New engine - Andscacs.

Post by Gerd Isenberg » Thu Feb 06, 2014 6:35 pm

cdani wrote:So if two people tells about the Popcnt thing, is that it's a must! :-)
So it's done! In the zip file now you will find a version "n" without the popcnt requirement.
Do you know if the instructions _BitScanForward64 and _BitScanReverse64 has problems also? I think no and that all the 64 bit cpu has it, but I'm not sure. I tell this because my program uses them.
Thanks for all.
Hi Daniel,
bsf/bsr ran on all x64, and their 32-bit counterparts since 80386. Some older AMD K8 or Intel Netburst need some more cycles.

Cheers,
Gerd

User avatar
velmarin
Posts: 1580
Joined: Mon Feb 21, 2011 8:48 am

Re: New engine - Andscacs.

Post by velmarin » Thu Feb 06, 2014 7:01 pm

cdani wrote:So if two people tells about the Popcnt thing, is that it's a must! :-)
So it's done! In the zip file now you will find a version "n" without the popcnt requirement.
Do you know if the instructions _BitScanForward64 and _BitScanReverse64 has problems also? I think no and that all the 64 bit cpu has it, but I'm not sure. I tell this because my program uses them.
Thanks for all.
Some machines have problems with prefetch, but it is unusual.

Also gives problems "GetTickCount64 ()" but not as usual use.

The engine is very strong. Felicidades.

Post Reply