Allegro.cc - Online Community

Allegro.cc Forums » Game Design & Concepts » Chess AI competition

This thread is locked; no one can reply to it. rss feed Print
 1   2 
Chess AI competition
Edgar Reynaldo
Member #8,592
May 2007
avatar

So, who's down?

I vote we come up with the best chess AI we can code and see who's ai wins in a tournament among the other ais.

GullRaDriel
Member #3,861
September 2003
avatar

I've never done chess Ai before, or a so basic one that it can't really be called an AI.

Can you share any ressource / documentation on the subject that you liked ? :D

"Code is like shit - it only smells if it is not yours"
Allegro Wiki, full of examples and articles !!

Niunio
Member #1,975
March 2002
avatar

Can you share any ressource / documentation on the subject that you liked?

Tim Hartnell's The Giant Book Of Computer Games.

Plays awful but it's BASIC basic code and 381 lines only (including comment lines and such). It is easy understandable and can be improved easily (I think).

-----------------
Current projects: Allegro.pas | MinGRo

Edgar Reynaldo
Member #8,592
May 2007
avatar

I've never written chess AI before either, but I think I could do a decent job with it.

You would have to implement scoring of moves somehow, based on position, threats, defense, and capturing pieces. Then make the best move.

GullRaDriel
Member #3,861
September 2003
avatar

I'll give it a try then :-)

"Code is like shit - it only smells if it is not yours"
Allegro Wiki, full of examples and articles !!

Edgar Reynaldo
Member #8,592
May 2007
avatar

Would you let like to help create the framework? Do you have some client server code?

GullRaDriel
Member #3,861
September 2003
avatar

I have some C client server code, with a basic network_message encapsulation which allow you to make network message of int/double/char* collections.

The calls can be threaded but it's not an obligation.

If it's fitting, then it's pure C and free of course.

I would gladly provide the source and examples, even binaries if it's under debian stable or windows.

Not tested but it should work on android too (/rent)

"Code is like shit - it only smells if it is not yours"
Allegro Wiki, full of examples and articles !!

Edgar Reynaldo
Member #8,592
May 2007
avatar

amarillion
Member #940
January 2001
avatar

Would be fun to try but I'm pretty busy at the moment. What's the deadline?

--
Martijn van Iersel | My Blog | Sin & Cos | Tegel tilemap editor | TINS 2017

Edgar Reynaldo
Member #8,592
May 2007
avatar

piccolo
Member #3,163
January 2003
avatar

in what Lag Pithon?

wow
-------------------------------
i am who you are not am i

RmBeer2
Member #16,660
April 2017

Hello, I read the thread and I would like to participate, I can provide my server protocol so that each one creates its own client program, my server already has everything necessary, works together with the identified user, chat and chess game.

With this I would facilitate all the work of the Server and Client, and it would save them the problem of mixing IAs, each AI opens as a different program with different users account, and the rest of users can see how the game playing as a guest.

What is needed is to create the basic functions of the AI ​​within a library, at least to better understand the functioning of the AI.

What do they say? They accept it? :D

Edgar Reynaldo
Member #8,592
May 2007
avatar

rmbeer you should make a private repository and then allow Gullradriel and I to be contributors do you have a GitHub account?

RmBeer2
Member #16,660
April 2017

I'm in bitbucket. Tell me the name of your account.

Edgar Reynaldo
Member #8,592
May 2007
avatar

RmBeer2
Member #16,660
April 2017

You now have access.

GullRaDriel
Member #3,861
September 2003
avatar

I could not answer before but here we go, the 32 and 64 bit windows example

Link to the example source code. You can scroll back to see the other files if needed.

I may have some times tomorrow to get out a simpler example and a little project.

I think anyone can create an account / git on framagit.org, where I'm actually hosted.

Edit: I'll look at the other things you said after a night of good sleep :-)

"Code is like shit - it only smells if it is not yours"
Allegro Wiki, full of examples and articles !!

RmBeer2
Member #16,660
April 2017

Then it will try something better than bitbucket, but for the moment we use that.

EDIT:

Although it is an open competition with no time limit, it would be better if you had some simple rules for the game, such as agreeing on Sundays each week to put them to battle and accumulate points.

I am still not sure if a basic API for all is necessary, I feel that this could harm the game.

What about my server? Do you want to use it?

Edgar Reynaldo
Member #8,592
May 2007
avatar

We need to actually see your server code before we decide if we're going to use it. ;)

There will have to be a time limit. We can't give unlimited CPU out and expect the games to finish anytime soon.

The competition won't start for several weeks/months. We have plenty of time to iron out the details.

There should be a ranking or elimination round before the competition, so we can make a better match up for the actual competition.

The clients should have to follow a certain API to enforce rules, legal moves, time limits, and prevent cheating.

How long should the competition last? 48 hours? 72 hours?

amarillion, you were probably expecting this, but would TINS be available to host the competition?

Oh, and one last thing, I want to call the program CHAI, for Chess Hack Artificial Intelligence.

RmBeer2
Member #16,660
April 2017

The server is available from the internet, any user can connect to the server, login/register and start playing, has time limit, saves the moves and controls that there are no cheats, no need to build any of that, so neither your source code is missing. Or are you thinking of something else? Did you plan to build the server yourself? How did you plan to test AI? I was just offering my server to save so many problems.

Have you already thought or planned everything or do you need more time to plan? Are you going to be the only moderator of the competition? Maybe I can help, because I'm interested.

Edgar Reynaldo
Member #8,592
May 2007
avatar

Can you publish your server protocol?

Your client didn't work and it isn't yet compatible with an ai player unless I'm mistaken.

GullRaDriel
Member #3,861
September 2003
avatar

Your client didn't work and it isn't yet compatible with an ai player unless I'm mistaken.

May you expand please ? Is there an ai protocol and where ?

Do you plan on us making a sort of text based server to host the chess parties ? With a given api for people to interact with their AI and a hosted party ? text based ?

Just askin' ;-)

"Code is like shit - it only smells if it is not yours"
Allegro Wiki, full of examples and articles !!

Edgar Reynaldo
Member #8,592
May 2007
avatar

Gully I was speaking to RM beer he has a server a chess server setup.

I haven't had the chance to look at your code yet but I will promise.

RmBeer2
Member #16,660
April 2017

You can download the basic info of the procotol from here:

http://blackrook.ddns.net/priv/ProtocoloComunicacion-en.pdf

By any problem that you have, tell me in the IRC channel.
I also recommend that you do not disclose this protocol outside of the participants of this competition, because I am not sure of doing it yet.

Edgar Reynaldo
Member #8,592
May 2007
avatar

I looked briefly at your protocol we would have to write a client or at least a basic client so that everyone could derive their own from it.

I don't currently have a working computer that I can work on so I can't really look at any code right now but I'll try when I get home.

Edit
In all reality, the user would only need to write one function.

All processing would be done on the server, so as to keep it fair, and to give equal time to each process.

typedef MOVE(*MakeAMoveFunc)(const BOARD& b , unsigned int turn_num , bool am_i_black);

Then all the user would have to do is supply a function pointer. We could write the rest of the client ourself.

 1   2 


Go to: