Ha Go

    Keywords: Software

HaGo is a go playing program written in the functional programming language [ext] Haskell. It uses the [ext] Tcl [1] scripting language as exposed by the [ext] TclHaskell library. [2]

OK, enough technical details. What are the cons and pros?

Cons:

  • It doesn't play very fast.
  • It doesn't play very intelligently yet.

Pros:

  • It is portable, in theory at least to WinX, Linux and Solaris
  • It is very readable. Basic move generation looks like this:
 generateMove :: Game -> Move
 generateMove g = produceMove (toMove g) g stdMoveGenerator
 stdMoveGenerator :: MoveGenerator
 stdMoveGenerator = inOrder $ map (filterMG notOnKoPoint)
     [ saveMyAtariGroups
     , takeHisAtariGroups
     , filterMG inBigLiberty allMoves `allBecause`
         "I'm just a stupid computer, I'll play in a large lib"
     , alWaysPass `allBecause` "Can't find a move, so
           I'll pass" ]

(You might have to learn Haskell, but it beats C IMHO)

The standard move generator first tries to save strings in Atari by extending or capturing surrounding groups, then takes any oppposing strings in Atari. When neither of these yields a plausible move, the computer will play randomly inside of a 'big' liberty or pass (when there are no big liberties left).


If you are interested in obtaining a version, you can send [email] me a mail.


[1] scriptics.com (The Script Archive) apparently collapsed some time in 2021, after having been in existence since at least 1998. This link was posted in 2001. Snapshots of the site can be viewed [ext] here. Note that the scripts themselves may be housed in a different archive structure, if preserved at all.

[2] This site was [ext] snapshotted in the Internet Archive from 2000 to 2007. The link, again, was posted in 2001.


Ha Go last edited by bugcat on September 4, 2021 - 09:15
RecentChanges · StartingPoints · About
Edit page ·Search · Related · Page info · Latest diff
[Welcome to Sensei's Library!]
RecentChanges
StartingPoints
About
RandomPage
Search position
Page history
Latest page diff
Partner sites:
Go Teaching Ladder
Goproblems.com
Login / Prefs
Tools
Sensei's Library