Terra Help and Information

bullet1 Help!

bullet2 Quick reference

bullet3 Commands & Option Tables

Following are all the commands and options in table form. Commands are given to Terra on the consol command line. Options are the ones in the file Terra.ini. The syntax is somewhat different between the two. Ponder on as a command and Ponder=1 in Terra.ini is exactly the same thing.In Terra.ini we always have the format Ponder=1 with '='. 1 is always on (or True). Commands are always written without '=' and instead of 1 or 0 we have on or off.

This is ridiculous, I know! Re-design needed....

  • General
    Command
    Option (Terra.ini)
    Description
    SaveIni [filename]
     
    Will save all the coitions into Terra.ini or the filename if given.
    LoadIni [filename]
     
    Will load the set of options in Terra.ini or the filename if given. If some of the options are missed in the file the default values will be loaded.
    quit
    Quits Terra
    q
     
    = quit  (Quits Terra )
    exit
     
    = quit or stop analyzing. It is also ends an edit sequence.
    new [x]
     
    Start a new game. if x is given. New log- and game-files are created, otherwise the same as before are used.
    analyze / analyse
     
    Starts the analyze mode . Terra is searching and displaying current lines until user moves or unmoves. Then Terra starts searching the new position.
    loadgame "file"
     
    Load a PGN game file in order to look at the moves.
    savegame "file"
     
    Save the current game in PGN-format.
    loadpos "file",n
     
    Load the nth EPD-line in the EPD-file given.
    savepos "file"
     
    Save/Append the current position in EPD format.
    setup "FEN-string"
     
    Will set up a new position according to the FEN- (or EPD)-string
    In consol mode you can as well paste the FEN-string right into the window.
    setboard "FEN-string"
     
    = setup
    reset
     
    Will reset all hash tables. killer tables etc.
    move
     
    Start Terra thinking, in order to eventually get a move
    m
     
    = move
    go
     
    = move (for WinBoard)
    stop
     
    If Terra is pondering or analyzing,  the search will immediately be stopped.
    forward [n]
     
    makes the next n moves in the move list. (Only possible after backward or unmove)
    backward [n]
     
    unmakes the previous n moves in the move list
    undo [n]
     
    unmakes the previous n moves in the move list
    u [n]
     
    = undo
    beep
     
    nothing happens
    ?
     
    "Move now". Demands immediately move, when Terra is thinking.
    force
     
    Turn off the engine and set Terra in a mode that doesn't start the engine automatically, when moves are entered.
    result "1-0, 0-1 or 1/2"
     
    Tells Terra that the game is over with the result given.
    draw
     
    Proposing a draw to Terra
    pause
     
    Not used
    hint
     
    Not implemented yet, but asks Terra for a hint move.
    display
     
    Display the current board in ASCII-format on the consol
    d
     
    = display
    edit
     
    The old form of setting up a new position, instead of the new setup command. After edit, a series of editing commands are following. The edit commands are described in the WinBoard help.
    Turned off. Use setup or setboard instead.
    run "filename"
     
    Will in order execute the Terra commands in the file  "filename"
    help
     
    Temporary disabled. Will display all the commands.
    helpw
     
    Will start this html help file in your browser
     
    contempt=x
    the evaluation value that Terra will set to theoretical draws. (3 fold repetition, 50-move rule etc.). 100 is the value of one pawn. e.g. If you want to avoid draws set a negative number like:
    contempt=-30
    Newfiles off/on
    Newfiles=0 or 1
    If 1, a new log-file  will be created for each game otherwise all logs will be appended to the current log-file. This goes for the game-file as well.
     
    Rootpath="path"
    Tells where to find files and directories, such as Book and Games)
    Rootpath=.\ (is the current directory where terra.exe is)
    Rootpath=..\ (is one level up)
    Rootpath=c:\games\chess\oldterra\  



     
  • Game Information and settings
    Command
    Option (Terra.ini)
    Description
    XBoard on/off
    =0 or =1
    If on, Terra will apply to WinBoard standard and set Logscreen off
    Logscreen on/off
    =0 or =1
    If on, Terra will print the log-file information on the consol as well. Logscreen will be set to off when XBoard on is given.
    ponder on/off
    =0 or =1
    on, makes Terra to think on opponents time .
    Nullmove on/off
    =0 or =1
    on, will make Terra to use the Nullmove logic during search.
    AutoBoard on/off
    =0 or =1
    When on, Terra will automatically display the board in ASCII-format in the log and on the consol after each move by Terra.
    board on/off
     
    = AutoBoard
    hash on/off
    =0 or =1
    if on, the main Hash table  will be used otherwise not.
    Evalhash on/off
    =0 or =1
    if on, Evaluation Hash table will be used otherwise not.
    Logfile on/off
    =0 or 1
    creates a log file or not. See Logfile
    EGTB on/off
    =0 or =1
    EGTB  will be used if it's on otherwise no EGTB search will be done.
    TBpath path
    =path
    'path' can be several directories separated by a comma character. i.e. path1,pat32,path3
    If a correct path is not given Terra will not continue to search for TB's
    TBsize s[K,M]
    =s[K,M]
    set the buffer size used by the EGTB logic. s is the size in bytes or if directly followed by K or M it is the size in Kb's or Mb's.
     
    whisper=0 or 1
    when Terra is on ICS, use whisper if whisper=1 otherwise Terra will use kibitz after each move in order to announce the PV-line.
    Hashsize h [e p]
    Hashsize h [x y z]
    sets the 4 different hash table sizes in bytes. Best usage is one value only meaning the toatla hash size. Terra will automatically distribute it amongst the other hash tab les
    Ex: Hashsize 33M (will set main hash table + the 3 other tables to 33 Mb in total)
    post
     
    will turn on/off posting. (When Terra displays it's thinking lines).
     
    resign=0 or 1
    1 makes Terra resign when the position is bad enough otherwise will Terra never resign.
     
    draw=0 or 1
    1 makes Terra, in the right circumstances , to accept draw offers and/or offer draws.
    rating x,y
     
    Tells Terra the ratings. x=Terra rating, y=opponents rating. Sent by WinBoard when playing on ICS.
    black
     
    set Terra to play the black pieces.
    white
     
    set Terra to play the white pieces.
    name
     
    the opponents name. Sent by WinBoard when playing on   ICS.
    info
     
    print the current options on consol as well as to the log-file.



     
  • Books and Learning
    Command
    Option (Terra.ini)
    Description
    createbook b  p[ h[ n]]
     
    Creates a book   with the name b by reading a PGN-file with the named p. If not path is given the PGN file has to be in the book directory and that's where the new book will be created. h half moves will at most be build in each line and a move has to be in at least n lines in order to be included. if h is not given the default value is 42 and the default for n is 1.
    compressbook b n
     
    Compresses the book b by removing all moves that are not used in at least n lines. Moves with Terra stat's or user set values are not removed.
    mergebooks b1 b2 [n]
     
    Merge the two books   b1 into b2. All the statistics will be recalculated. Both has to be in the Book directory and a move has to be in at least n lines in order to be included. Defaut value for n is 1.
    clearbook "b"
     
    The book file "b", will be completely cleared from dynamic values. That is the learning from Terra's games and/or user set values.
    checkbook "b"
     
    Will check the book file "b" for errors and make some corrections.
    Bookeval "val"
     
    The current positions book value (if it is in the BookFile) will be set to "val". See How to change the book
    BookLimit x
    BookLimit=x
    where x is between 0 to 100. Preferably somewhere between 30 and 50. BookLimit is controlling how hard Terra will use the Fixed values  in the book file. The value is the minimum winning percentage for a certain move. Read more about learning options
    MinBookGames x
    MinBookGames=x
    where x is # of games that must be played in order to rely on  the Fixed values.
    Read more about Learning options .
    RandomType n
    RandomType=n
    The RandomType option tells which one of these statistics to use and how.
    0.   Use the first available move. No selection is done.
      1. Pick the move with best Dynamic stat's  (limited by MinTerraGames and TerraLimit) otherwise the best from Fixed stat's based on frequency (limited by MinBookGames and BookLimit).
      2. As in 1 but randomly where the better moves have better chance to be selected (the Roulette Wheel method).
      3. Pick the move with best Dynamic stat's (limited by MinTerraGames and TerraLimit) otherwise the best from Fixed stat's based on win% (limited by MinBookGames and BookLimit).
      4. As in 3 but randomly where the better moves have better chance to be selected (the Roulette Wheel method).
    Read more about Learning
    MinTerraGames x
    MinTerraGames=x
    # of games played by Terra with this move, before using Terra's statistics. See random type
    TerraLimit n
    TerraLimit=n
    This parameter tells when the Dynamic statistics will be used in the Book move selection logic.
    Dynamic statistics is what Terra learns during the games and is kept together with each move.
    The RandomType option tells when Dynamic statistics is to be used before the Fixed statistics.
    When not enough games are played by Terra, with the current move that statistic is not useful.
    TerraLimit sets how many times Terra have to play this before Dynamic statistics will override the Fixed statistics.
    Try TerraLim=3
    Read more about Learning
    book on/off
    =0 or =1
    if on, the book in BookFile is used otherwise book is turned off.
    BookFile "file"
    ="file"
    Points to the book file to use. Must be in the Book directory.
    PostBook on/off
    =0 or =1
    if on, the PostBook is used otherwise not.
    Postlearn on/off
    =0 or =1
    if on, the post book will be updated with learned values. See learning
    BookLearn on/off
    =0 or =1
    if on, the book will be updated with learned values. See learning
    Bmoves [r]
     
    display the book and/or Postbook moves with the best, according to book and learning settings, placed as number one in the list. If 'r' is given a randomized version will be run. (Gives different results each time simulating how Terra is working internally).
    Bstat
     
    display the book and Postbook moves and their statistics for the current position.



     
  • Commands for testing
    Command
    Option (Terra.ini)
    Description
    nodecnt n
     
    Will count all legal moves in all legal combinations from current position with the depth=n.
    track n
     
    only if Terra is compiled for tracking
    eval
     
    evaluates the current position (no searching) and displays it.
    material
     
    computes the material value in the current position and displays it.
    preeval
     
    currently not used
    swapoff sq[ n]
     
    Terra will compute the SEE (Static Exchange Value) for the square sq. If n is given, Terra will take the time or computing SEE for sq, n times.
    sq is the square number with a1 as 0, b1 as 1,..., a2 is 8,..., h8 is 63
    allmoves
     
    Display all the valid moves in this position
    allcapt
     
    Display all the valid captures in this position
    testtb epd-file
     
    Will run through the epd-positions and check against the EGTB files. Two files are created: FoundTB.epd = the epd-positions with the score included. NotFoundTB.epd with the epd-positions that couln't be found in the TB files
    testset epd-file
     
    Will run through the test suite  in the epd-file. The current time setting will be used as time for each position in the test suite. Terra will keep track of how many correct answers is found. The result will be written to the file testset.txt Two files are created: TesetWrong.epd and TestsetRight.epd
    quiescence
     
    Terra will go trough the optimal capture sequence in current position  and return the outcome.
    qs
     
    = quiescence
    perf1 ["file"]
     
    Performance test 1. The quick one. The file perf1.epd is used for this test if no other file is given. result written to perf1.txt
    perf2 ["comment"]
     
    Performance test 2. The current time setting is used. The file perf2.epd is used for this test. Results written to perf2.txt with the "comment" text included.
    perfgen
     
    Performance test of the genmove function
    killers
     
    Displays all the killers kept. Both in killer table 1 and 2
    historykillers
     
    Displays the 20 best moves in the history table ordered by value.
    gethash [HKey]
     
    Displays what's in the hash table for the current position or HashKey if given.
    gethasheval [HKey]
     
    Displays what's in the eval hash table for the current position or HashKey if given.
     
    CntLoops=n
    Don't change the default value, unless you can't resist...



     
  • Level and Time Options
    Command
    Option (Terra.ini)
    Description
    level cnt min[ incr]
     
    sets the time options.
    • level 40 60   (40 moves/60 min tournament)
    • level 0 5 0   (5 min total game time)
    • level 40 5 0  (40 moves/5 min tournament)
    • level 0 5 -1  (40 moves/5 min tournament) because 40 moves is default
    • level 0 3 5   (Fisher time: Start with 3 min and +5 sec/move
    l
     
    see level
    st s
     
    Set move time to maximum s seconds
    fixedtime m:s
     
    The move time is set to fixed m minutes and s seconds.
    fixedtime :s is short notation of 0 minutes and s seconds.
    ft n
     
    see fixedtime
    sd n
     
    The max search depth set to n. sd or the set time, whichever comes first, will break the search.
    compcomp
     
    Terra will play both black and white with the time settings
    useruser
     
    Terra will not play at all. User enters all moves. The same as the force command
    compuser
     
    The normal mode. The computer plays against the user, wether the user is a human, another computer, locally or on ICS.
    time
     
    Tells Terra how much time is left in total.
    otim
     
    Tells Terra how much time the opponent has left
    hard
     
    see ponder on
    easy
     
    see ponder off



     
  • WinBoard Commands
    Command
    Option (Terra.ini)
    Description
    bogus
    Sent from WinBoard when it doesn't understand some input.
    protover "ver number"
     
    Command sent from WinBoard. Terra automatically responds with features handled by Terra.
    ics "server name"
     
    Sent from WinBoard to tell if it is an ICS session and what server is used.
    ping "number"
     
    Command sent from WinBoard.
    rejected "feature"
     
    Command sent from WinBoard
    accepted "feature"
     
    Command sent from WinBoard.
    computer
     
    Tells Terra that the opponent is a computer.




     
  • UCI commands
    These are in short commands that are given from the GUI to Terra:

    Command
    Description
    uci
    Start using the uci protocol. The first command given.
    debug on/off
    Not used by Terra.
    isready
    Used to synchronize the engine with the GUI
    setoption name <id> value <x>
    Used to change the engine speific paramters specified by the engine (see the uci protocol description)
    position [pos] moves <move1,..., movei>
    setup a position specified by pos and make the moves move1 to movei.
    go [search commands]
    Start searching according to the given comands.
    stop
    Stop searching immediately
    ponderhit
    During pondering, tells the engine that the user played the expected move.
    quit
    Quit the program as fast as possible.


    More about UCI can be found here


     

bullet3 Options Default

The options that can be set in Terra is in the file Terra.ini. This file has to be in the same directory as terra.exe in order to be found. In fact you can set a new "home directory" in Terra.ini and that will cause all options to be saved in the new Terra.ini

If you don't have a Terra.ini file when starting Terra, a new one will be created with default settings.

The file Terra.ini is read when Terra is starting and all the options are set accordingly.

If you change some options during play they will not be saved in Terra.ini and be used only during the current game, if not saved by the command SaveIni.

Terra.ini is build up by the sections below. Here with the default values (if the book is found)


[Show]

LogScreen=1

AutoBoard=1

Whisper=1


[Data]

RootPath=.\

NewFiles=0

LogFile=1

TBpath=.\TB\

TBsize=4M


[Book]

BookFile=mini.boo

PostFile=PostBook.dat

Book=1

PostBook=1

BookLearn=1

PostLearn=1

RandomType=2

BookLimit=20

MinBookGames=4

TerraLimit=30

MinTerraGames=2


[Hash]

EvalHash=1

Hash=1

HashSize=24M


[Game Options]

Ponder=1

NullMove=1

Contempt=0

Resign=1

Draw=0

EGTB=0


[Test]

CntLoops=2500000


If some option is found in a section where it not is belonging to, it will be ignored and a default value will be set under the right section.

bullet3 Command line parameters

All of Terra's options can be set in Terra.ini but when starting Terra from command line there are a few parameters that might be useful.

These different parameters can of course be combined.

Terra XBoard
Will make Terra WinBoard  compliant. Normally not needed as the GUI sends the Xboard command
Terra /run=file  
Will first run the commands in file before taking any other input. These commands are ordinary Terra commands
Terra /root=c:\games\oldTerra\
Will make Terra to use c:\games\oldTerra\ as it's home directory. That means that terra.ini, the game, book and other folders will be searched for there.
Terra /setup="FEN-string"
Will make Terra to first setup the position described by the FEN-string before reading any input.
Terra /hashsize=size
Sets the hash table sizes. /Hashsize=48M will give in total 48 Mb hash table size. Don't use decimals in the figures.


Please give your comments in WinBoard Forum or email me. This document was updated 2004-08-02.