People's names next to entries in this file mean they intend to work on that
item soon.  Please contact them before working on related areas, to avoid
duplication of effort and to make sure our changes merge easily.

* Evaluations:
** Allow different settings (e.g. search ply, candidates, tolerance) for each
  position class. Also allow different settings for cube action.
** Add more evaluation classes.
*** Add a neural net to correct errors in BEAROFF1 class.
*** Classes for bearing off against contact, back games, containment
  positions, prime-vs-prime...
*** Consider meta-pi scheme for using output from multiple nets.
** Add another "eval"-like command that show the distribution of
  equities n rolls ahead.  SW does bar graphs of this stuff; Cam Trenor
  suggests alternative output.
** Improve quasi-random dice generation for rollouts. (gary)
** Create multiple threads to parallelise rollouts (and evaluations?) on
  multiprocessors.  Perhaps start remote processes?
** Add more statistics for rollouts (e.g. number of times each player hit,
  number of turns on the bar, whether each player is closed out, average
  number of pips wasted bearing off, etc.)
** Add cubeful rollouts
** Add a cache for cubeful evaluations.
** Joseph has weights for small (5 hidden nodes) nets, which could be
  used for the internal evaluations of deep searches for a significant
  speed increase.  See FindBestMoveInEval() in eval.c from fibs2html.
** The cubedecision REDOUBLE_BEAVER should never occur -- should it be
  removed?  We could add a "too good to beaver" cubedecision.  This is
  not as silly as it sounds: you can currently take advantage of gnubg
  to escape a backgammon by doubling, if you have cube access; gnubg
  doesn't realise it's too good to beaver.
** Bearoff database changes:
*** Use a more intelligent encoding in the 1-sided database, to conserve
  space.
*** Joseph notes the 1-sided bearoff database is nearly as good as the
  2-sided.  Add an option to omit the 2-sided one, to conserve disk
  and memory space.  (And time to generate them -- on a 330MHz Pentium II,
  it takes 3 minutes to generate the 1-sided database and 20 for the
  2-sided.)

* Commands:
** Add more completions to readline (e.g. player names). (gary)
** Add interactive rollouts.
** Analyse games and matches.
*** Add an "analyse move" command.
*** Allow re-evaluating analysis with different settings, and rollouts.
*** Add "set automatic analysis".
*** Make sure cube analysis works for beavers.
*** Should luck be evaluated cubefully?  (An option, perhaps?)
*** Use the fComputed field in statcontext (make "show statistics ..."
  complain if not computed, disable the GTK menu items if not available).
*** Make DumpStatcontext and GTKDumpStatcontext work for money sessions.
*** Make sure analysis works with resignations.
** Finish saving positions and evaluations to databases.
** Finish supervised training, and allow people to submit training data via
  web.
** Make output*() functions wrap words, and pause before scrolling (as in
  gdb).  Make sure output to stderr is available when using GTK -- perror
  calls will have to be replaced, for instance.
** Extend FormatMove() to handle abbreviation of multiple moves (e.g.
  "8/7(2) 6/5(2)").
** Allow resuming interrupted rollouts, and extending completed rollouts.
** Add a "set record" command; when "record" is off, no moves are
  recorded (which implies that "save", "list" and the game list window
  won't work, but it will save memory for situations like playing
  10,000 games vs. pubeval).  Better would be to retain only the
  current game of a money session.
** Add a command "show moves" which shows a list of legal moves, like hint
  does, but without evaluating them.
** Also "add move", to add a specific move to the list (e.g.
  "add move 8/5 6/5").
** Once we have cubeful rollouts, allow the command "rollout =cube"
  to perform a rollout to judge cube decisions (under GTK, there should
  be a "Rollout" button in the hint window for cube decisions, and something
  under the Analyse menu).
** Make "show marketwindow" say something for money games.
** Make "set score" handle "set score crawford -3" or "set score 4C 3".
** Kit suggests that it's more important to get early plays right in
  rollouts.  Should we consider options that allow larger search space/
  search depth/etc. for early moves in rollouts than later ones?  (Kit's
  suggestion is to maximise the chance of finding the right play for
  the initial roll and response, and whatever speeds things along while
  still finding reasonable plays after that.)
** Should CommandSetEvalParamType really allow setting EVAL_NONE?
  What effect is that supposed to have?
** When a resignation has been offered, "hint" should show whether to
  accept or decline the resignation.

* Guile:
** Add more data types and Scheme bindings for useful functions.
** Define Scheme "port"s for the gnubg output() functions.
** Use Guile keywords in cube-info.  Add a similar function for eval
  contexts.
** Add Guile functions to access and modify the current game state.
** Add whatever Guile functions are necessary for implementing Cam Trenor's
  suggestion (generating random positions which are initial doubles). (gary)

* TTY interface:
** Display the score and match length in ShowBoard().
** Handle "list game" and "list match".  (oysteijo)
** Allow setting/editing commentary.
** Show take/drop analysis.

* X interface:
** Does anybody still use the old Xlib (Ext) interface any more?  If so,
  perhaps they are interested in maintaining it.  If not, maybe it should
  be deprecated and eventually removed (all the recent GUI effort has
  concentrated on the GTK interface anyway).

* GTK interface:
** Allow copy/paste and drag & drop of the board ID in the board window.
** Add a prompt and entry field to allow commands to be entered (replacing
  stdin).
** Allow the user to decide whether short messages appear in dialogs
  instead of the status bar, or whether all messages are appended to a
  message window.
** Disable the "stop" button when nothing is happening.
** Have a progress bar along with some text in the main window, which
   indicates progress for the current possibly time-consuming operation.
   E.g. when the user clicks 'hint' the progress text will show
   "finding best moves..." and the progress bar will indicate how far
   gnubg is in the process. This could/should be implemented for
   "evaluation", "hint", when gnubg is considering cube action,
   when gnubg is searching for it's best move etc.
** Add option to exchange the dice after a single click move has been
  made.
** Make sure we apply GTK styles correctly: create a GtkRcStyle; set the
  background colour in the style and the flag indicating the background is
  set; call gtk_widget_modify_style; unref the style.  This makes sure the
  style will survive across theme changes.
** Make usage() show the GDK and GTK options, if appropriate.
** Show a preview of the chequers in the appearances dialog.
** Allow the border colour to be changed, and honour the user's lighting
  angle when rendering the border.  Allow the dice pips colour to be
  changed.
** Use a file selection widget for the socket in the player dialog.
** Would ShowList() look better if it used a text widget?
** Spin buttons with large values (e.g. the RNG seed settings) behave
  strangely.  This is GTK+'s fault (adjustments store their values as
  floats, which have less precision than ints).
** During a rollout, the OK button should be the grab widget.  Can we
  fix that by temporarily modifying pwGrab?  (Or maybe we should allow
  the entire the whole rollout dialog to be active, for copy/paste.)
** Enable and disable the take/drop/redouble/agree/decline etc. buttons
  and menu items when appropriate.
** Make some of the information below the board optional (suggested by Jeremie 
  Petit).  This might be possible with a vertical pane widget, but it would
  be nice if there was a way to forbid children from being given _more_ than
  their requested size.  This might require a subclass which overrides
  gtk_vpaned_motion and sets paned->min_position.
** Optionally merge the game record and annotation windows into one big
  paned window (suggested by Jeremie Petit).
** Use different styles for moves in the game window, depending on the
  annotation.
** Add the players' names in the drop-down menu in the game window.  (They
  used to be there, but weren't updated if the names were changed.)
** Use a progress bar when generating a heuristic bearoff database. (gary)
** When a long string is displayed in the status bar, the main window
  grows to accomodate it -- not very pretty.  A Layout or Viewport widget
  might be able to fix this.
** Make GTKDumpStatcontext check psc->fMoves, psc->fDice and psc->fCube,
  and only output the relevant statistics.
** Update the GTK+ SetEval(), SetPlayers() and SetRollouts() to match
  the new evalsetups. (gary)

** Dialogs:
*** Make "help" show its output in a CList (CTree?).  The user must be able
  to recurse through help for subcommands.
*** Allow selection of data from the rollout dialog (see the hint dialog for
  an example). (gary)
*** Make the rollout dialog look more like the hint dialog. (gary)
*** Allow copy/paste from the "hint" cube output and statistics dialogs.
*** Display "hint" output for cube decisions in some kind of table.

** MS Windows:
*** The stop button has no effect.  One approach would be to define a
  polling macro which sets fAction if gtk_events_pending() is true, and call
  this macro before testing fAction.  (This might also allow screen refreshes
  while evaluations are in progress.)

** Deprecated functions:
  Once GTK+ 2.0 is released, remove references to the following deprecated
functions:
*** gdk_style_get_font
*** gdk_style_set_font
*** gdk_image_new_bitmap
*** GtkText

* Bugs:
** When using mmap()ed bearoff databases, add a signal handler for
  SIGBUS/SIGSEGV to trap I/O errors.  Unfortunately, the semantics of
  errors on mmap()ed regions are the most unportable that can be imagined...
** The erroneous commands "set player both" and "set player both evaluation"
  give poor error messages.  Bad "set rollout" commands (e.g.
  "set rollout chequerplay plies") also give bad errors.
** "help load sfdkljsdlf" gives a poor error message.
** "set player <tab>" gives incorrect completions.
** When using guile and guile isn't using readline, X events are not
  handled while in the REPL.  When using guile and guile _is_ using
  readline, its readline state and ours get completely confused...
  see what the REPL in guile-gtk does.
** Check that calls to GTKUpdateAnnotations() are made where necessary
  (e.g. the "annotate" commands probably should, and "set output ...").
** The SGF loading (saving?) routines and CommandLoadCommands use
  stdio, which restarts system calls on signals.  This means TTY interrupts
  and the GTK `stop' button don't work. (gary)
** The "stop" button (i.e. the grab widget) automatically removes the
  grab on itself when it gets a "button release".  It would be more
  robust to add a parent to it (box or event box?), and give _that_
  the grab.  Unfortunately, grab add/remove calls must nest, and we
  can't guarantee that...
** There's no way to see the annotation on the opening move using the
  TTY interface.  Changing ShowBoard() to display the starting position
  and then the annotation might work.
** The SGF lexer and parser are robust against illegal input, but the
  game reading functions in sgf.c are very fragile.  They need to be
  fixed to detect invalid saved games.
** CommandCopy() should complain (or copy a board initialised to the
  starting position) if no game is being played.
** Problems importing JF positions (see David's e-mail).
   (Update: untested bugfix commited)
** "show score" (and the Guile function current-score) should show the
  number of games finished, but seem to report the total number of games
  started, regardless of the current location within the match.  Actually,
  the entire use of ms.cGames is questionable, since we might not have
  every game in a match/session recorded.  This has ramifications in
  gtkgame.c: SelectGame, GTKAddGame, GTKPopGame, etc. (gary)
** If "set turn" has been used during a game (so a player has two
  consecutive moves), then export to .mat format saves it incorrectly.
** "set score" does not update the score in the GTK game window option menu.
** TTY rollout output is wider than 80 columns.
** Analysis with rollouts crashes under GTK.  (There are problems with the
  rollout window -- do we really want a window in this case?)
** We only allow the player on roll to resign.  But the other player can
  resign in imported FIBS (and JF?) games... this can show the wrong player
  resigning when using the TTY interface.  We also need to calculate how
  many points a resignation was for.  See Little_Sister match
  990429083514-MattiT-1985-5468-13-bgbored-25-5.txt (game 2) for an example
  of both problems.
** When a match is over, the prev game/prev move menu items are disabled.
** Issuing some commands (e.g. "set clockwise") while in edit mode
  destroys the editing changes.
** FindContext() doesn't understand quoting.  That means that
  a command like "\set <tab>" (including the backslash) won't handle
  completion.  FindContext() probably needs to duplicate its parameter
  and call NextToken(). (gary)
** The command "set turn 0 <tab>" incorrectly allows completion for
  additional parameters. (gary)

* Documentation:
** Complete the Texinfo manual.  Perhaps for now, only things that are
  unlikely to change should be documented.

* Miscellaneous:
** Add internationalisation (gettext).
** Add more to http://www.gnu.org/software/gnubg/... -- perhaps pages to
  submit training data, an online evaluator like Monte Carlo, maybe even an
  entire game like Motif.
** Submit something to <http://www.distributed.net/nextgen/projects.html>.
** Allow loading and saving weights to specify binary or ASCII format.
** Import and export games, positions and matches in various formats:
*** FIBS `oldmoves'.
*** PostScript, EPS and PDF.
*** JF .gam, .mat and .pos.
**** Make the .mat format identical to Jellyfish (things to check:
  beavers, resignations, "and the match"...)
*** SGG.
**** Check drops, beavers, resignations, implement Crawford and Jacoby etc.
*** HTML.
*** ASCII.
*** LaTeX.
** Improve the LaTeX, PS and PDF output:
*** Add names and scores before each game.
*** Show game and match statistics (if available) at end of game/match.
*** Allow some option for selecting which boards to print (see the
  "FG" SGF property).
** Think about generating huge databases for CD-ROMs (we can get 1-sided
  databases for all chequers up to the 11 point, or 2-sided databases where
  both players have up to 11 chequers in the home board onto a CD-ROM).
** Add optional time rules, for tournament play when clocks are used.
** Add more optional feature tests to "make check" -- databases, X?
** Add import/export tests.
** Change the fConfirm ("are you sure you want to abort the game in
  progress") checks so that they _do_ ask when the game is over but the
  match is still in progress, and they _don't_ ask if a game has not been
  modified since it was last loaded/saved.
** Extend ParsePosition to cope with other formats, e.g. FIBS
  "boardstyle 3" and/or a human friendly position description,
  like "set board (0 -1 2 -2 2 -3 -4 -2 -3 0 0 0 0 1 0 0 0 0 1 2 2 2 2 1 0 0)".
** Handle SGF variations.
** Allow loading/saving of compressed games/matches with zlib.
** Make the external player handle cube and resignation decisions, and allow
  connection via TCP/IP.
** Allow an option for illegal moves to be entered.
** Allow ~ and $ escapes in filenames (use wordexp()).
** Allow printing positions/games/matches/etc.  (More or less the same
  as exporting to PostScript, but piped to a printing process.) (gary)
** Keep statistics of won/lost games/matches.
** Make sure the Nackgammon option works properly: record when loading/saving,
  make sure that InitBoard during analysis gets it right, etc.  Similarly
  for Egyptian and Jacoby.
** Make calls to irandinit() in eval.c and lib/neuralnet.c give the time as
  a seed.
** If a MOVE_NORMAL is marked bad, it's not clear whether that means a
  bad move, or a costly missed double.
** Consider some kind of interface for recording live matches as quickly
  as possible.
** The current name setting code silently converts whitespace into
  underscores.  This isn't really necessary; it would be OK to use names
  verbatim, and equate whitespace and underscores in the command parsing
  code instead. (gary)
** $HOME might not exist on non-POSIX settings.  What are better alternatives
  for finding a place to save per-user settings?
** Think about adding features which attempt to predict the time and
  standard error of rollouts in advance (see Chuck's work). (gary)
** Make sure that player names containing a `:' don't mess up the FIBS
  string. (gary)
** Allow very large (128 bit+) seeds. (gary)
** Allow the caller of the Rollout* functions to specify a callback function
  (to replace the current hard-coded GTKRollout()/output* calls).
** The note in the README file about compiling with Compaq's cc should
  be automated in the configure script.

* Obselete or problematic ideas (probably better not to implement these):
** Save partial input when TTY input is overwritten by an X command.
  The best way would be to unify what GetInput does and ProcessInput,
  with push/pop semantics for readline state.
** Nothing handles running out of memory gracefully.  A solution
  could be to write a malloc() wrapper that (if malloc fails) first
  tries to free memory (e.g. flush the eval cache); if malloc still
  doesn't succeed, then print an error message and longjmp() to the
  main loop.  When using the GNU C library, __malloc_hook can be used
  too (so we can intercept calls coming from Xlib, for instance).  We
  shouldn't longjmp() out of the hook, though (it might confuse library
  functions).


Local Variables:
mode: outline
End:
