• Caterpillar
    Caterpillar
    JuLieN
    Posts: 35 from 2008/4/16
    From: France
    I'm currently learning to program intuition and everything to make an interface for chess engines. Chess engines are typically cli-programs. But I am not sure how to handle them from the GUI.

    What's the best way to do this on Amiga OS?

    The typical execution loop would be :

    Start:
    load engine
    Exec Loop:
    -> send commands to engine
    <- get result from engine and display them in the GUI
    Goto Exec Loop

    Eventually, one of the command would be "quit". All this has to be in separate processes (or threads ?) as the GUI has to be responsive at any time. For instance, if the user decides to quit from the menu or the close gadget, the GUI must be able to send a "quit" command to the engine even if it is currently computing.

    Also, there are situations when several engines could be loaded and communicating with, like an engine vs engine tournament, for instance. So I guess they'd need separate cli-handling ?

    I hope the description is enough. So, what's the best way to do that ? I see a couple of functions in the dos.library that I guess are possible candidates : Cli, CreateProc, Execute, SetConsoleTask, etc...

    I already ported my chess engine last year to MorphOS, but it was a pure cli program and so had nothing specifically amigaish in it. Now a GUI is something totally different. :)
    "A good bug is a dead bug" (Don Dailey)
  • »09.04.14 - 20:24
    Profile Visit Website