Help with new chess engine.

Programming Topics (Computer Chess) and technical aspects as test techniques, book building, program tuning etc

Moderator: Andres Valverde

Help with new chess engine.

Postby Daniel Uranga » 14 Apr 2009, 19:53

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?)
Daniel Uranga
 
Posts: 26
Joined: 01 Apr 2009, 05:15

Re: Help with new chess engine.

Postby Edmund » 14 Apr 2009, 19:59

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.
Edmund
 
Posts: 38
Joined: 25 May 2008, 15:17

Re: Help with new chess engine.

Postby Dann Corbit » 14 Apr 2009, 20:21

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).
Dann Corbit
 

Re: Help with new chess engine.

Postby Olivier Deville » 14 Apr 2009, 20:32

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
User avatar
Olivier Deville
 
Posts: 1176
Joined: 26 Sep 2004, 19:54
Location: Aurec, France

Re: Help with new chess engine.

Postby Daniel Uranga » 14 Apr 2009, 20:47

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.
Daniel Uranga
 
Posts: 26
Joined: 01 Apr 2009, 05:15

Re: Help with new chess engine.

Postby Pedro Castro » 15 Apr 2009, 07:22

Hi Daniel,

the name of your program?

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

Pedro Castro
User avatar
Pedro Castro
 
Posts: 180
Joined: 28 Jan 2005, 01:09
Location: Pays Basque (Spain)

Re: Help with new chess engine.

Postby Daniel Uranga » 15 Apr 2009, 13:06

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.
Daniel Uranga
 
Posts: 26
Joined: 01 Apr 2009, 05:15

Re: Help with new chess engine.

Postby Ron Murawski » 15 Apr 2009, 18:30

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
User avatar
Ron Murawski
 
Posts: 352
Joined: 26 Sep 2004, 21:50
Location: Schenectady, NY, USA

Re: Help with new chess engine.

Postby Miguel A. Ballicora » 16 Apr 2009, 00:21

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)
User avatar
Miguel A. Ballicora
 
Posts: 160
Joined: 03 Aug 2005, 02:24
Location: Chicago, IL, USA

Re: Help with new chess engine.

Postby Daniel Uranga » 16 Apr 2009, 03:41

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>
Daniel Uranga
 
Posts: 26
Joined: 01 Apr 2009, 05:15

Re: Help with new chess engine.

Postby Miguel A. Ballicora » 16 Apr 2009, 07:12

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
User avatar
Miguel A. Ballicora
 
Posts: 160
Joined: 03 Aug 2005, 02:24
Location: Chicago, IL, USA

Re: Help with new chess engine.

Postby Dann Corbit » 16 Apr 2009, 20:16

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.
Dann Corbit
 

Re: Help with new chess engine.

Postby Dann Corbit » 16 Apr 2009, 20:48

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.
Dann Corbit
 

Re: Help with new chess engine.

Postby Dann Corbit » 16 Apr 2009, 20:59

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.
Dann Corbit
 

Re: Help with new chess engine.

Postby Dann Corbit » 16 Apr 2009, 21:05

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.
Dann Corbit
 

Re: Help with new chess engine.

Postby Daniel Uranga » 16 Apr 2009, 22:35

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.
Daniel Uranga
 
Posts: 26
Joined: 01 Apr 2009, 05:15

Re: Help with new chess engine.

Postby Dann Corbit » 16 Apr 2009, 23:53

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.
Dann Corbit
 

Re: Help with new chess engine.

Postby Pedro Castro » 17 Apr 2009, 12:46

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.
Best wishes,

Pedro Castro
User avatar
Pedro Castro
 
Posts: 180
Joined: 28 Jan 2005, 01:09
Location: Pays Basque (Spain)

Re: Help with new chess engine.

Postby Olivier Deville » 17 Apr 2009, 15:49

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
User avatar
Olivier Deville
 
Posts: 1176
Joined: 26 Sep 2004, 19:54
Location: Aurec, France

Re: Help with new chess engine.

Postby Dann Corbit » 17 Apr 2009, 19:20

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.
Dann Corbit
 

Next

Return to Programming and Technical Discussions

Who is online

Users browsing this forum: No registered users and 29 guests