Skip to content
/ gtp Public

Go Text Protocol helper library for engines in Golang

Notifications You must be signed in to change notification settings

rooklift/gtp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 

Repository files navigation

gtp

Go Text Protocol helper for engines in Golang.

Requires rooklift/sgf library.

  • The app registers its genmove() function with gtp.StartGTP()
  • The genmove() function receives an sgf.Board and an sgf.Colour
  • The genmove() function returns an SGF-formatted move, e.g. dd
  • Or it can return pass or resign
  • Other GTP commands are handled automatically by the library.

For an example of a fully functioning random-move generator constructed with this library, see random.go inside the examples folder.

Technical notes

Behind the scenes, the library is generating an SGF tree of the game, and using the sgf library for legality checking and undo functionality. The custom GTP command savesgf can be used to dump that as a file.

About

Go Text Protocol helper library for engines in Golang

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages