Winboard state machine diagram

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

User avatar
phhnguyen
Posts: 1434
Joined: Wed Apr 21, 2010 4:58 am
Location: Australia
Full name: Nguyen Hong Pham

Re: Winboard state machine diagram

Post by phhnguyen »

Harald wrote: Mon Apr 15, 2019 10:40 pm Hi

I am trying to understand the communication between Winboard and the chess engine a little better.

See: Chess Engine Communication Protocol
http://www.open-aurec.com/wbforum/WinBo ... -intf.html
and: WinBoard/XBoard protocol state diagram
https://www.chessprogramming.org/Chess_ ... n_Protocol

Sometimes the Winboard documentation is hard to understand and at some points
the Chess Engine Communication Protocol diagram is not right but it helps a lot.
I try to draw an own diagram with yEd Graph Editor misusing the flow chart symbols.
This (attached image) is what I got so far. It is not done yet and it may have errors.
I did not check the analyze part - only the thinking part.
Are there any comments or corrections?

The fat blue boxes are the states. The ellipses are Winboard commands.
The yellow boxes are engine responses. The small arrows indicate the possible
commands per state and the fat arrows are state changes.
The commands are grouped together in the order that Winboard uses.

Harald
Good work and effort! Thanks for your contribution!

Just some small suggestions IMHO:
- Missing some commands such as "draw", "resign", "?"
- Did not see some commands such as "ping", "quit" to "Pondering"
- Similar, there is no "quit" to "Thinking"
- Your graph has "usermove" to "Thinking": I think it is big trouble for both engines and interfaces. How comes and what is the logic?
- Look like states "Waiting" and "Ponder complete" are redundant. They are simply your "Force Mode"
- There should be another state "Initializing" for working with commands "protover", "feature"... This state will move to "Force Mode" when receiving a) "feature done=1", b) time out or any other commands if there is no "feature done=0" before.
https://banksiagui.com
The most features chess GUI, based on opensource Banksia - the chess tournament manager