Page 1 of 1
Chess GUI programing
Posted: Tue Apr 12, 2016 12:15 pm
by Ju'
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.
Re: Chess GUI programing
Posted: Tue Apr 12, 2016 8:12 pm
by geko
Re: Chess GUI programing
Posted: Wed Apr 13, 2016 10:23 am
by Ju'
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.
Re: Chess GUI programing
Posted: Wed Apr 13, 2016 10:36 am
by Ju'
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'
Re: Chess GUI programing
Posted: Wed Apr 13, 2016 3:29 pm
by H.G.Muller
There are actually just two elements: engine and GUI. They communicate with each other by a set of commands called the 'protocol'.
Re: Chess GUI programing
Posted: Sat Apr 16, 2016 3:58 pm
by Ju'
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?
Re: Chess GUI programing
Posted: Mon Apr 18, 2016 8:43 am
by H.G.Muller
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).