Page 1 of 2

Help with new chess engine.

PostPosted: 14 Apr 2009, 19:53
by Daniel Uranga
Hi all, im recently involving with chess programming. I need some advice and opinions about my program. Sorry for my awful english!
Here i send the program. Bye!
(Where can i post my program?)

Re: Help with new chess engine.

PostPosted: 14 Apr 2009, 19:59
by Edmund
Most Engines have a website to inform the public about updates.

a good source for information is the CPW. Otherwise you might want to look at the source of some open source engines like TSCP.

Re: Help with new chess engine.

PostPosted: 14 Apr 2009, 20:21
by Dann Corbit
I will take a look at it for you if you like.
If you want to make the sources public, I will host them on my site.

It might seem embarassing to you at first, since you are a beginner. But many pairs of eyes will find more mistakes than a few.

If your engine is in C (and not in C++) then I recommend SPLINT to give the code a beating. It will shriek about the tiniest mistake (though it only finds static problems and not runtime issues).

Re: Help with new chess engine.

PostPosted: 14 Apr 2009, 20:32
by Olivier Deville
Hi Daniel !

Welcome to our strange world :)

If you engine is already capable of playing a game, I can include it in my next Promotion tournament that will start in a few days.

Good luck anyway with the new engine.

Olivier

Re: Help with new chess engine.

PostPosted: 14 Apr 2009, 20:47
by Daniel Uranga
Thanks for your fast replies! My program isnt good enough for having is own website rigth now. It can play a game, but doesnt support en passant nor playing has withe.
I want my program to be open source, how could i seen it to you Dann Corbit?
I would really like to include my program in a tournament! it can already beat Pulchess and gray-matter, and does a good game against Faile. I think it will take 15 days or so to be ready for tournament.
Thank you all a lot for your comments! I really appreciate your help.

Re: Help with new chess engine.

PostPosted: 15 Apr 2009, 07:22
by Pedro Castro
Hi Daniel,

the name of your program?

where are you?, the Uranga surname is Basque, especially of Gipuzkoa.

Re: Help with new chess engine.

PostPosted: 15 Apr 2009, 13:06
by Daniel Uranga
http://www.mediafire.com/download.php?ynydnu1z5ot. That is the last "version" of my program. It needs a LOT of work still, but I am very interested in improving it.
Not yet have a name, maybe call it "RataRadioctiva", any suggestions?
Pedro Castro: Im from Argentina, but i know that my ancestors were Basques.
Cheers and good luck to all.

Re: Help with new chess engine.

PostPosted: 15 Apr 2009, 18:30
by Ron Murawski
Daniel Uranga wrote:http://www.mediafire.com/download.php?ynydnu1z5ot. That is the last "version" of my program. It needs a LOT of work still, but I am very interested in improving it.
Not yet have a name, maybe call it "RataRadioctiva", any suggestions?
Pedro Castro: Im from Argentina, but i know that my ancestors were Basques.
Cheers and good luck to all.


Your engine is added to the Chess Engine List
http://computer-chess.org/doku.php?id=c ... ngine_list

but the program name is based on your source code:
myname=\"Amor incondicional\"
English translation: "Unconditional Love"

Ron

Re: Help with new chess engine.

PostPosted: 16 Apr 2009, 00:21
by Miguel A. Ballicora
Daniel Uranga wrote:http://www.mediafire.com/download.php?ynydnu1z5ot. That is the last "version" of my program. It needs a LOT of work still, but I am very interested in improving it.
Not yet have a name, maybe call it "RataRadioctiva", any suggestions?
Pedro Castro: Im from Argentina, but i know that my ancestors were Basques.
Cheers and good luck to all.


If the name is short and has some meaning is better. Playing with your last name I would suggest
"Urano" or "Milanga" (con fritas). Something more indigenous like "Vizcacha"? Where are you from exactly in Argentina?

This will be the 6th engine with Argentine roots. Vamos todavia!

Miguel (de Munro, Bs. As. ahora en Chicago)

Re: Help with new chess engine.

PostPosted: 16 Apr 2009, 03:41
by Daniel Uranga
The string "Amor incondicional" was just for testing! Not really intended to be the program name. Anyway Im very happy to see it on a chess engine list with "real" chess engines.
If someone of you have some free time: advices in how to continue improving my code are always welcome!

<spanish>
Miguel: Soy de Olavarría, provincia de Buenos Aires, pero ahora estoy estudiando Ingenieria de sistémas en Tandil, el programa lo estoy haciendo como proyecto final para algoritmos, si todo sale bien, me libro de dar el final :D . Igualmente siempre me gusto mucho el ajedrez, y mas de pibe tenia un nivel bastante bueno. Tengo ganas de hacer algo que quede medianamente bien, seria genial.
</spanish>

Re: Help with new chess engine.

PostPosted: 16 Apr 2009, 07:12
by Miguel A. Ballicora
Daniel Uranga wrote:The string "Amor incondicional" was just for testing! Not really intended to be the program name. Anyway Im very happy to see it on a chess engine list with "real" chess engines.
If someone of you have some free time: advices in how to continue improving my code are always welcome!

<spanish>
Miguel: Soy de Olavarría, provincia de Buenos Aires, pero ahora estoy estudiando Ingenieria de sistémas en Tandil, el programa lo estoy haciendo como proyecto final para algoritmos, si todo sale bien, me libro de dar el final :D . Igualmente siempre me gusto mucho el ajedrez, y mas de pibe tenia un nivel bastante bueno. Tengo ganas de hacer algo que quede medianamente bien, seria genial.
</spanish>


Te aconsejo que le agregues a tu motos la function "perft" y "perftdiv" y te concentres en que juegue ajedrez legal en forma perfecta. Esas dos funciones te ayudaran a sacarte de encima los bugs mas importantes (si googleas vas a encontrar mas informacion). Abri to codigo fuente y le di un vistazo muy rapido. Consejo: a mi me parece que incluir asserts es vital en un motor ajedrecistico (aunque no todo el mundo lo hace) para cazar a los bugs tan pronto como puedas.

Tal vez podes abrir una cuenta de gmail y establecer una web page ahi. Mucha gente podra ayudarte y darte consejos. No te preocupes en la fuerza de tu motor por ahora. Si juega ajedrez en forma correcta, no se cuelga, etc. hay mucha gente que disfruta jugandole a motores a los cuales tienen alguna chance de ganarles. Concentrate en las caracteristicas basicas antes de que te agarrre la adiccion de querer hacerlo mas fuerte. Eso llega solo, pero no hay nada que le moleste mas a los testers que los motores se le cuelguen.

Buena suerte en tu proyecto!

Saludos,
Miguel

Re: Help with new chess engine.

PostPosted: 16 Apr 2009, 20:16
by Dann Corbit
Daniel Uranga wrote:Thanks for your fast replies! My program isnt good enough for having is own website rigth now. It can play a game, but doesnt support en passant nor playing has withe.
I want my program to be open source, how could i seen it to you Dann Corbit?
I would really like to include my program in a tournament! it can already beat Pulchess and gray-matter, and does a good game against Faile. I think it will take 15 days or so to be ready for tournament.
Thank you all a lot for your comments! I really appreciate your help.


My email is dcorbit@connx.com
I can host both source and binary for you.

Jim Ablett builds the fastest binaries around. If your program becomes open source, no doubt he will build one.

Re: Help with new chess engine.

PostPosted: 16 Apr 2009, 20:48
by Dann Corbit
Daniel Uranga wrote:Hi all, im recently involving with chess programming. I need some advice and opinions about my program. Sorry for my awful english!
Here i send the program. Bye!
(Where can i post my program?)


Here is a Windows version (I made a few small changes to compile it on Windows):
http://cap.connx.com/chess-engines/new- ... jedrez.zip

Source, MS VC++ IDE project, and binary included.

I did not bother with a PGO build yet.

Re: Help with new chess engine.

PostPosted: 16 Apr 2009, 20:59
by Dann Corbit
Daniel Uranga wrote:The string "Amor incondicional" was just for testing! Not really intended to be the program name. Anyway Im very happy to see it on a chess engine list with "real" chess engines.
If someone of you have some free time: advices in how to continue improving my code are always welcome!

<spanish>
Miguel: Soy de Olavarría, provincia de Buenos Aires, pero ahora estoy estudiando Ingenieria de sistémas en Tandil, el programa lo estoy haciendo como proyecto final para algoritmos, si todo sale bien, me libro de dar el final :D . Igualmente siempre me gusto mucho el ajedrez, y mas de pibe tenia un nivel bastante bueno. Tengo ganas de hacer algo que quede medianamente bien, seria genial.
</spanish>


Suggestions:
1. Add a setboard command.
2. Add a command to analyze a test set.
3. Add a command to evaluate a position or set of positions.
4. Add a command to rotate the board and also to reverse colors.
These are all very helpful for debugging.

Also, with most Winboard engines, the following can be used to get the engine going (not every engine has set time (st) in seconds, but for lazy people like me who want something quick it is also nice to have):
st 5
new
post
go

In order to do a profile and step through the code, we need some simple way to get the engine going from the console. I don't want to have to emulate the exact conditions of Winboard startup.

Re: Help with new chess engine.

PostPosted: 16 Apr 2009, 21:05
by Dann Corbit
Dann Corbit wrote:
Daniel Uranga wrote:The string "Amor incondicional" was just for testing! Not really intended to be the program name. Anyway Im very happy to see it on a chess engine list with "real" chess engines.
If someone of you have some free time: advices in how to continue improving my code are always welcome!

<spanish>
Miguel: Soy de Olavarría, provincia de Buenos Aires, pero ahora estoy estudiando Ingenieria de sistémas en Tandil, el programa lo estoy haciendo como proyecto final para algoritmos, si todo sale bien, me libro de dar el final :D . Igualmente siempre me gusto mucho el ajedrez, y mas de pibe tenia un nivel bastante bueno. Tengo ganas de hacer algo que quede medianamente bien, seria genial.
</spanish>


Suggestions:
1. Add a setboard command.
2. Add a command to analyze a test set.
3. Add a command to evaluate a position or set of positions.
4. Add a command to rotate the board and also to reverse colors.
These are all very helpful for debugging.

Also, with most Winboard engines, the following can be used to get the engine going (not every engine has set time (st) in seconds, but for lazy people like me who want something quick it is also nice to have):
st 5
new
post
go

In order to do a profile and step through the code, we need some simple way to get the engine going from the console. I don't want to have to emulate the exact conditions of Winboard startup.


You have the code needed for setboard already in your source tree, but you have not exposed setboard as a command. You should do that first.

To analyze a test set, it is as simple as:
1. Set the time with st or time
2. Read position from file
3. End of file? If yes, then stop.
4. Set the board from the position you read {setboard}
5. execute go
6. Go to step 2.

Sometimes, you do not want to test search+eval, but only eval. So you should also have a mode exactly like the mode above but it only performs eval and not search.
It is a very good idea to have a way to reverse the colors and reverse the board so that you can find out if (for instance) any of your evaluation terms have the wrong sign -- it's easy to do especially if you cut and paste a bit of code from one place to another or if you are thinking from white's standpoint when you write it.

Re: Help with new chess engine.

PostPosted: 16 Apr 2009, 22:35
by Daniel Uranga
Thanks Miguel and Dann for your very useful advice. I have already do a great improvement since the last time, when more complete and error free I will publish it here. The published version has an horrible bug in his eval, now fixed.
Im focusing now in legal move detection, when i try to prune illegal positions in my search function it plays strange sometimes, but i think i will fix it soon.

Re: Help with new chess engine.

PostPosted: 16 Apr 2009, 23:53
by Dann Corbit
You can do a diff with the source I posted at:
http://cap.connx.com/chess-engines/new- ... jedrez.zip
and figure out what you need to do to get it to work on Windows.

Most of the testing programs run on Windows and not Linux, so a Windows version of your program will get you a lot more testing time than a Linux version.

I think probably it could be built with GCC on Windows, so the changes may not be that important. I just made a VC version because the tools (debugger, profiler, etc.) are so much easier to use.

Re: Help with new chess engine.

PostPosted: 17 Apr 2009, 12:46
by Pedro Castro
Hola Daniel,

Cuando tu motor esté un poco más maduro y pueda jugar con blancas y negras en Winboard y tenga ya un nombre definitivo lo incluiré con tu permiso en el siguiente paquete y página.

http://sites.google.com/site/motoresdeajedrez/

En tu función de CasillaAtacada veo que primero compruebas en diagonal si la pieza es un alfil y si no lo es compruebas luego si es una dama saltando con un goto, ¿no puedes hacer la consulta si la pieza es un alfil o una dama en el mismo paso y ahorrarte una segunda vuelta? Lo mismo para el caso de horizontales y verticales con torre y dama.

Re: Help with new chess engine.

PostPosted: 17 Apr 2009, 15:49
by Olivier Deville
Hola Daniel :)

I have tried Dann's compile and it works here under Winboard. I can include your engine in my Promo tourney, even though it plays only with black pieces (I already have a few ones like this).

This will give you motivation to improve fast :) Updates are allowed anytime, even during the tournament. But I would at least need a name for the engine :wink:

Olivier

Re: Help with new chess engine.

PostPosted: 17 Apr 2009, 19:20
by Dann Corbit
Olivier Deville wrote:Hola Daniel :)

I have tried Dann's compile and it works here under Winboard. I can include your engine in my Promo tourney, even though it plays only with black pieces (I already have a few ones like this).

This will give you motivation to improve fast :) Updates are allowed anytime, even during the tournament. But I would at least need a name for the engine :wink:

Olivier


What's wrong with "Unconditional Love"?
I think (as a name) I like it better than "Fruit", which I like a lot.