Help with new chess engine.

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

Moderator: Andres Valverde

Re: Help with new chess engine.

Postby Daniel Uranga » 17 Apr 2009, 20:12

Finally I chose a name! I will call my program "RataAeroespacial" (aerospace rat), a name that describes it very well (??). I really like how RataAeroespacial sounds :P .
Dann Corbit I will make Windows compiles for my engine when its more complete. Thanks for your portability modifications, i will add them to the engine.
Oliver it would be great to see RataAeroespacial in a tourney! No matter it doesn't still understand enpassant and makes illegal moves sometimes? I will upload an updated version later this night, i cant do it right now because my internet connection is working really bad... :( .

<spanish>
Tenes razón Pedro con eso del goto, lo voy a mirar pronto. No hay ningún problema en que incluyas el programa en tu lista, ojala le sirva aunque sea a los principiantes para poder ganarle alguna partida a la computadora :D .
</spanish>
Daniel Uranga
 
Posts: 26
Joined: 01 Apr 2009, 05:15

Re: Help with new chess engine.

Postby Daniel Uranga » 19 Apr 2009, 06:45

I have set up a Google site for my engine: http://sites.google.com/site/rataaeroespacial/Home, the latest sources and binaries are available here.
An windows build is done (thanks to Dann Corbit's modifications to get it working under VC++), and it plays as white and as black, so.. its ready for ChessWar? It still lacks en-passant, stalemate, 3 repetition and 50 moves draw, but I think I will add all of this soon.
Daniel Uranga
 
Posts: 26
Joined: 01 Apr 2009, 05:15

Re: Help with new chess engine.

Postby Olivier Deville » 19 Apr 2009, 06:52

Great news Daniel !

I'll run a small test very soon.

Olivier
User avatar
Olivier Deville
 
Posts: 1176
Joined: 26 Sep 2004, 19:54
Location: Aurec, France

Re: Help with new chess engine.

Postby Guenther Simon » 19 Apr 2009, 09:45

Daniel Uranga wrote:I have set up a Google site for my engine: http://sites.google.com/site/rataaeroespacial/Home, the latest sources and binaries are available here.
An windows build is done (thanks to Dann Corbit's modifications to get it working under VC++), and it plays as white and as black, so.. its ready for ChessWar? It still lacks en-passant, stalemate, 3 repetition and 50 moves draw, but I think I will add all of this soon.



Hi Daniel,

The new compile doesn't run here. I get an error message that the application cannot be started...
It seems either you have to statically link to some libraries or provide them with the download.
A third option could be that I would need a newer .Net version than 2.0 but I don't think so?

Guenther
User avatar
Guenther Simon
 
Posts: 794
Joined: 26 Sep 2004, 19:49
Location: Regensburg, Germany

Re: Help with new chess engine.

Postby Olivier Deville » 19 Apr 2009, 10:07

Guenther Simon wrote:
Daniel Uranga wrote:I have set up a Google site for my engine: http://sites.google.com/site/rataaeroespacial/Home, the latest sources and binaries are available here.
An windows build is done (thanks to Dann Corbit's modifications to get it working under VC++), and it plays as white and as black, so.. its ready for ChessWar? It still lacks en-passant, stalemate, 3 repetition and 50 moves draw, but I think I will add all of this soon.



Hi Daniel,

The new compile doesn't run here. I get an error message that the application cannot be started...
It seems either you have to statically link to some libraries or provide them with the download.
A third option could be that I would need a newer .Net version than 2.0 but I don't think so?

Guenther


Hi Guenther

It is running here. Possibly your system needs some kind of update (maybe last Visual Studio stuff or something).

Olivier
User avatar
Olivier Deville
 
Posts: 1176
Joined: 26 Sep 2004, 19:54
Location: Aurec, France

Re: Help with new chess engine.

Postby Guenther Simon » 19 Apr 2009, 10:51

I tried the third option and installed .Net 3.5 on this machine and now the new compile
is running.

@Daniel: You should include versioning for the myname feature for better differentiating
from new versions.

Guenther
User avatar
Guenther Simon
 
Posts: 794
Joined: 26 Sep 2004, 19:49
Location: Regensburg, Germany

Re: Help with new chess engine.

Postby Dann Corbit » 21 Apr 2009, 03:35

Method:
bool Tablero::CargarFen ( string &fen )

Needs to examine the en passent status, the castle rights, and the side to move.

If the side to move is white, it should do this:
Code: Select all
            bandoComputadora = BLANCO;

If the side to move is black, it should do this:
Code: Select all
            bandoComputadora = NEGRO;


If these things are accomplished, then you will have a working setboard by adding this to main.cpp:
Code: Select all
        else if (leer.find("setboard ")!=-1)
        {
   string aux2 (leer.substr(9));
   t.CargarFen (aux2);
        }
Dann Corbit
 

Re: Help with new chess engine.

Postby Dann Corbit » 21 Apr 2009, 04:01

Your pice list for a given side overflowed its bounds because you never reset the value of cant.
I stuck in a simplified reset, but it is almost certainly wrong.
You need some way to keep track of the current count in the piece list for the side in question.

void AgregarPieza ( uint8_t pos )
{
assert(cant >= 0 && cant <= 7); // bugbug:drc this assert was firing right and left.
p[cant] = pos;
cant++;
cant %= 8; // bugbug drc: the value gets incremented here, but it was not getting reset.
}

Here is the version I was fooling around with. The setboard command does not work yet.

http://cap.connx.com/chess-engines/new- ... pacial.zip
Dann Corbit
 

Re: Help with new chess engine.

Postby Daniel Uranga » 22 Apr 2009, 02:12

I will add version numbering in the next release, but first, i want to correctly implement checkmate, stalemate, castle and enpassant. A better FEN loading function will be added too.
@Dann: I could not reproduce the errors that you describe in AgregarPieza.
AgregarPieza()==AddPiece() (here I do "cant++")
SacarPieza()==RemovePiece() (here I do "cant--")
So i think that works... I checked it whit an assertion and was OK. Also my movegen is based on "ListaPiezas", and i get correct perft at least for ply==4:
Code: Select all
feature myname="RataAeroespacial" sigint=0 sigterm=0 analyze=0 done=1
perft 4
197281 Nodos en 0 segundos: infMnps


Next release will be ready when i get correct perft for higher plys.
Daniel Uranga
 
Posts: 26
Joined: 01 Apr 2009, 05:15

Previous

Return to Programming and Technical Discussions

Who is online

Users browsing this forum: No registered users and 33 guests