Chess GUI programing

Code, algorithms, languages, construction...
Post Reply
Ju'
Posts: 4
Joined: Tue Apr 12, 2016 12:04 pm
Real Name: Julien

Chess GUI programing

Post by Ju' » Tue Apr 12, 2016 12:15 pm

Hello!

I am currently in french High school and need to program for the computer science baccalaureate a chess programme.

As far as my researches went, i understood that a chess programme is based from three elements: the GIU, the engine and the protocol.
I am planning to use an engine, and program the GUI myself in Java/processing.
I went ahead and choose to use the Amyan engine, which is compatible with the Universal Chess Engine, and programmed in Java.
How do i proceed next?
Where do I get the UCI? How to integrate Amyan into the GUI?

I may sound confused, but i am quiet a bit lost :( ...
Thank you so much.

geko
Posts: 34
Joined: Mon Aug 01, 2011 5:11 pm

Re: Chess GUI programing

Post by geko » Tue Apr 12, 2016 8:12 pm


Ju'
Posts: 4
Joined: Tue Apr 12, 2016 12:04 pm
Real Name: Julien

Re: Chess GUI programing

Post by Ju' » Wed Apr 13, 2016 10:23 am

Thank you for your reply.
I had a look at the UCI webpage... but how do I get the UCI ‎? the link you sent me only describes the UCI, does not provide any download link...

I hope I don't bother you too much.
‎How do I enter the board data into the UCI, and therefore into the engine?
How does the UCI exit the data?

Thank you for the pipe hint - I'll look into it.

Ju'
Posts: 4
Joined: Tue Apr 12, 2016 12:04 pm
Real Name: Julien

Re: Chess GUI programing

Post by Ju' » Wed Apr 13, 2016 10:36 am

thank your for your quick answer,

I had a look at the UCI website you linked; But how do i download it? is it a package I need to download or is it integrated into the engine?
I will look into pipes hint - thanks for that.
i guess pipes is how i can make the board data enter into the UCI, and therefore into the engine, as well as how the UCI exits the data?

Thanks,

Ju'

H.G.Muller
Posts: 190
Joined: Sun Jul 14, 2013 10:00 am
Real Name: H.G. Muller

Re: Chess GUI programing

Post by H.G.Muller » Wed Apr 13, 2016 3:29 pm

There are actually just two elements: engine and GUI. They communicate with each other by a set of commands called the 'protocol'.

Ju'
Posts: 4
Joined: Tue Apr 12, 2016 12:04 pm
Real Name: Julien

Re: Chess GUI programing

Post by Ju' » Sat Apr 16, 2016 3:58 pm

Thank you for your answer.
So the UCI is integrated into the engine?
How to I link the engine and the GUI? Is that what the pipes are for?

H.G.Muller
Posts: 190
Joined: Sun Jul 14, 2013 10:00 am
Real Name: H.G. Muller

Re: Chess GUI programing

Post by H.G.Muller » Mon Apr 18, 2016 8:43 am

UCI is a language. Both the engine and the GUI must speak it in order to be able to communicate.

The pipes are the communication channels through which the GUI and the engine send each other commands and moves.

The GUI normally sets up the pipes and starts the engine. I don't know Java, so I cannot tell you how this should be done there. Typically you first use some function system to create two pipes. Then the GUI will start an engine process such that the engine writes into the input end of one pipe, and reads from the output end of the other. And finally it will the start reading from the output end of the pipe the engine writes on, and will write commands in the input end of the pipe the engine reads from. Usually by two separate threads, so it can do both at the same time. (Or, in an event-driven encironment, it sets it up so that arrival of any message in the pipe to which the engine writes will call a handler that then updates the display, and might write into the pipe from which the engine reads (or from which a second engine that is the opponent reads).

Post Reply