8

I am writing a chess engine in C++ https://github.com/RomainGoussault/Deepov.

I know there are several interface protocols out there (UCI, Winboard protocol, etc) and I don't know which to implement. I would like one that:

  • enables my engine to play online tournaments
  • has several GUI for Linux, Windows and iOS
  • has some sort of documentation

Thanks

  • 2
    Why Java? Believe me, you'll regret it when you're optimizing your engine for speed. – Rafiek Aug 18 '14 at 11:45
  • Because I know Java well. I also know that Java is really slow compared to other languages. I may port it to C++ afterwards. – Romain Aug 18 '14 at 11:47
  • Ok, but I recommend porting as soon as possible ;) – Rafiek Aug 18 '14 at 11:50
  • 1
    Porting to C++ done ;) – Romain Jul 24 '15 at 7:46
9

There're only two protocols - UCI and Winboard. Winboard is an old protocol and not really being used nowadays. Crafty is the only major engine still supporting the Winboard protocol, but it's only because the engine is also very old. UCI is a newer protocol developed by Shredder, and is used everywhere - Windows, Macs, Linux, Android, iOS etc. UCI is really the only protocol you should consider.

  1. UCI is supported everywhere
  2. Every chess GUI other than xboard supports UCI, such as, Chessbase, Scid, Arena etc. Even xboard can connect to a UCI engine by something known as Polyglot.
  3. UCI documentation is at http://wbec-ridderkerk.nl/html/UCIProtocol.html

Winboard has more or less obsoleted because the protocol is more complicated than the cleaner UCI. Winboard is a stated protocol, it means the engine state depends on the previous iterations, whereas UCI is easier to deal with as you only have to supply with your current FEN or a move-list.

  • 1
    A minor correction on the above -- chess GUIs such as Arena typically don't use FEN for communicating game states with UCI. They use move lists from the start of the game. This allows the engine to correctly deal with the fifty move rule and other game features that often aren't adequately communicated with FEN. The protocol does use FEN however for setting up arbitrary game positions, and positions where the entire move list is unknown. However the poster is correct in all other particulars. – johnwbyrd Jul 19 '15 at 16:44
  • 1
    @johnwbyrd I've edited my answer. Thanks. – SmallChess Jul 20 '15 at 1:24
  • 1
    FEN works fine for the fifty move rule. It's the threefold repetition rule that causes problems. – Kef Schecter Jan 19 at 1:26
1

I don't think it's possible to create a GUI or engine as separate apps in iOS. iOS prevents one app from invoking another as part of its security setup. An engine author has to write the GUI, and integrate it with the engine before he can apply to Apple for approval for release on the App Store. This may be true of Windows RT as well. Android has GUIs and engines.

Also apart from UCI and CECP (Chess Engine Communication Protocol, i.e. winboard/xboard), Chessbase has its own proprietary protocol. Many of the strongest engines use UCI, while beginning programmers quite commonly use CECP.

  • It's also true for Windows phone. – SmallChess Sep 22 '15 at 0:22
-3

Most GUI support engines either in UCI or Winboard, UCI becoming more of a standard and popular these days. But, typically if you want your engine to be easily pluggable to any GUI (in Windows or Linux), then you should have an "exe" or executable which can be pointed to by these GUI programs. If you are building the engine using Java, then I am unsure how you would be able to convert this to an executable to be used by the GUI. The same thing applies to be able to play online tournaments. Even if you are planning to provide a web-service kind of interface for your engine, I don't think it can participate in engine competitions.

  • No. Java can be natively built for on .exe. Java doesn't always have to be run on a virtual machine. – SmallChess Aug 18 '14 at 6:43
  • The .exe file you're talking about is a engine file. The engine must support either UCI or Winboard. Otherwise, no chess GUI can read from it. Your statement makes no sense. – SmallChess Aug 18 '14 at 6:44
  • I cannot but laugh at your comments. Try running a java program without the JRE installed. – Keshav Aug 18 '14 at 7:13
  • 1
    If you did some programming, you'll laugh at yourself. Java can be compiled to a native program. – SmallChess Aug 18 '14 at 7:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.