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
RmBeer2
Member #16,660
April 2017
avatar

The most complicated thing is to create the connection and disconnection functions, especially in TLS.

The rest of the functions is only about assembling commands in binary and sending it by connection.
Then a separate function to read the answers received and to be called in each frame (Unless there is another better method).

It seems good to me that an API is still needed so that everyone can communicate more easily with the Server, but is it necessary for the participants to use their functions for AI? Is not part of the challenge? :-/

╔═══════════════════════════════╗
╫ 🌟 Web of BlackRook 🌟 Patreon 🌟 YouTube 🌟 ╫
╚═══════════════════════════════╝

Edgar Reynaldo
Member #8,592
May 2007
avatar

rmbeer said:

The most complicated thing is to create the connection and disconnection functions, especially in TLS.

The rest of the functions is only about assembling commands in binary and sending it by connection.
Then a separate function to read the answers received and to be called in each frame (Unless there is another better method).

This sounds like a job for you and Gully. I don't have any experience with sockets or clients and servers, so you would both probably do a faster better job than I would with this part.

rmbeer said:

It seems good to me that an API is still needed so that everyone can communicate more easily with the Server, but is it necessary for the participants to use their functions for AI? Is not part of the challenge?

I'm not quite sure what you mean here. Could you explain a little?

I'm writing up a framework and a new client. If we could use your server and server code we would be good.

EDIT
Prototype human game almost ready

EDIT2
Been debugging allegro, haven't had a chance to finish yet. Bump for more time.

EDIT3
Implementing the rules is taking a little longer than expected. Patience.

EDIT4
Basic moves are done. Haven't implemented things like king check checking yet. Pawn promotion and castling are coming. After that, a playable prototype should be ready.

{"name":"612019","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/6\/8\/68c81a3937844e67dc8a561371f8b876.png","w":1282,"h":833,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/6\/8\/68c81a3937844e67dc8a561371f8b876"}612019

EDIT5
It should be two person playable by the end of the day. Standby.

EDIT6
I lied. Tomorrow.

MiquelFire
Member #3,110
January 2003
avatar

Here I come to bump so Edgar doesn't need to edit his post!

---
Febreze (and other air fresheners actually) is just below perfumes/colognes, and that's just below dead skunks in terms of smells that offend my nose.
MiquelFire.red | +Me
If it doesn't resolve the issue, we'll evaluate whether the latest round of anti-speculative-execution patches we've had to apply could somehow be responsible. (The performance impact of this fix is estimated to be just a couple of percent, but a banana on a football field isn't even that much and yet woe unto the quarterback who steps on it.) Gonna have to start looking at AMD CPUs. ~Owner of Nearly Free Speech.net

Edgar Reynaldo
Member #8,592
May 2007
avatar

Awesome, thanks Mr. Fire. :)

Anyway, I lied again. It needs a day of debugging before it will be ready. Sorry for the delay.

GullRaDriel
Member #3,861
September 2003
avatar

I got your mail Ed, but I had not time to spare. I may have some time during the next few days, I'll try to make you a correct answer this evening.

"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

Don't worry Gully, PM me when you have time ;)

Almost ready....

Ironing out some last minute bugs...

Adding save games and loading...not tested, no controls yet

Adding color adjustment...

Adding rewind and fast forward (ooh la la) (doesn't quite work yet)

Ctrl R resets the game at any time.

Technically when it's checkmate there won't be any moves left, but I haven't programmed anything special for it yet. I checkmated in one game, and the move list was empty.

Select start and destination with the LMB. Right click cancels the selection.

Left or Right will change black's hue. Hold shift while pressing left or right to change white's hue.

Hover over or select a piece to see its moves.

Get your static win32 binaries here (CHAI2P_distro1.7z).

Obligatory screenies :

{"name":"612024","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/d\/1\/d173b7173f5680684d6bdb1816fc42f7.png","w":1026,"h":801,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/d\/1\/d173b7173f5680684d6bdb1816fc42f7"}612024

{"name":"612025","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/f\/c\/fc6503f8b73f13eb66ce810fd25b180d.png","w":1026,"h":801,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/f\/c\/fc6503f8b73f13eb66ce810fd25b180d"}612025

{"name":"612026","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/1\/d\/1d7b98438b4e53c6c7a4d9be2e1f4515.png","w":1026,"h":801,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/1\/d\/1d7b98438b4e53c6c7a4d9be2e1f4515"}612026

And one for fun - playing with the same hue :
{"name":"612028","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/7\/a\/7aec8fdd3f1ab1df881a3bd7c0068a75.png","w":1026,"h":801,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/7\/a\/7aec8fdd3f1ab1df881a3bd7c0068a75"}612028

For the most enjoyment, play with two mice. ;) xD

GullRaDriel
Member #3,861
September 2003
avatar

OK, now in what consist the ssl server ?

What do you want Ed ?

I was thinking of functions inside separated threads which would allow you to use something like AddNetworkMessage when you need it, and a GetNetworkMessage which would return queued messages if any.

Is there a description of the protocol somewhere ? Where do I obtain the certificate to test for a connect or two ?

I'm going to make some tests using y own generated certificates, but I'll need what I asked to make the glue between Ed's gui and your server.

BTW Ed if there is a Gullsomething somewhere, you can be pretty sure it's me. GitHub you said ?

"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

rmbeer's server may be overkill for this. We could probably throw one together fairly quickly (a week or three) if we don't use it.

His protocol is linked above.

Gullradriel, is this you? https://github.com/GullCode

Woah. Just found this :

https://www.chess.com/

GullRaDriel
Member #3,861
September 2003
avatar

It's me, but I've choose framagit instead since microsoft bought github. I'm here for my public publications (heh) https://framagit.org/GullRaDriel

Docs for my api can be found here: https://www.nilorea.net/html/index.html

And if for a start it's just you and me and a custom client server in C/C++, we'll have to make a little chat and the thing will be done in a few hours.

I can easily set a client server, and have cross platform (android included) messages. We just have to agree on the protocol and/or the functions to call.

I have no (yet) proxy support. Full ipv4/v6 TCP socket or nothing.

Edit: I'll go and check the github :-)

Edit: I have trouble building git Eagle.

C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: Can't open .lib file: cbbuild\lib\libeagle_debug.dll.a
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 6 second(s))
1 error(s), 0 warning(s) (0 minute(s), 6 second(s))

Edit2: it was missing the cbuild\lib directory

Edit3: everything was fine until D:\DATA\PROG\VARIOUS\CHAI\CHAI-master\src\ChaiClient.cpp|239|error: 'class Transform' has no member named 'ApplyTransformation'|

"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

Git pull. I'll check and make sure everything compiles...

EDIT1
Everything is up to date. git pull and you should be good to go.

Note, Eagle can build with cmake now too...

GullRaDriel
Member #3,861
September 2003
avatar

I'll test

"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

We should arrange a time to meet on IRC. I've been away for a few days. Have you had a chance to build Eagle and Chai? I haven't tried it on Linux and I haven't made a cmake file for chai yet, but it should be simple...

EDIT1
Hey, I made a funny push. I need to workout a couple things and then I'll push again.

EDIT2
I fixed the broken build. A fresh checkout should work now. git pull one more time.

EDIT3
I've made some progress towards building the network code. All it needs now is your touch with send and recv and listen. If you build the project, it will output some warning messages that let you know what you need to work on.

git pull ftw... (On Eagle and CHAI)

EDIT4
CHAI builds with CMake now, if you use an Eagle\include and Allegro525\include and Eagle\lib and Allegro525\lib folders with binaries you can build yourself using CMake for Eagle.

GullRaDriel
Member #3,861
September 2003
avatar

Je suis un peu occupé en ce moment, jusqu'à vendredi inclus. Cela ira mieux à partir du week end prochain, et les semaines suivantes.

I'll try to find a few minutes to 'git pull' and 'cmake' 'make' ;-)

BUMP

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

 1   2 


Go to: