<p>I don't have an answer to your question of whether the theory of Conway games has been used in building game-playing programs, but still you might be interested in the <a href="http://cgsuite.sourceforge.net/" rel="nofollow noreferrer">Combinatorial Game Suite</a>, "an open-source program to aid research in combinatorial game theory" (which I first learned about <a href="https://mathoverflow.net/a/150947/1015">here</a>).  It includes an implementation of various standard operations on Conway games in canonical form, as well as a scripting language for describing new games.</p>

CC BY-SA 3.0
2014-10-05T14:40:35.120Z
2014-10-05T14:40:35.120Z
2017-04-13T12:57:54.777Z
Noam Zeilberger
<p>on some search there do not seem to be much published general implementations of surreal numbers. heres an implementation of surreal numbers in <a href="http://en.wikipedia.org/wiki/Coq" rel="nofollow">coq</a>. </p>

<ul>
<li><p><a href="http://dl.acm.org/citation.cfm?id=2150520" rel="nofollow">Surreal numbers in coq</a> / Mamane, TYPES'04 Proceedings of the 2004 international conference on Types for Proofs and Programs</p>

<blockquote>
  <p>Surreal Numbers form a totally ordered (commutative) Field, containing copies of the reals and (all) the ordinals. I have encoded most of the Ring structure of surreal numbers in Coq. This encoding relies on Aczel's encoding of set theory in type theory.</p>
  
  <p>This paper discusses in particular the definitional or proving points where I had to diverge from Conway's or the most natural way, like separation of simultaneous induction-recursion into two inductions, transforming the definition of the order into a mutually inductive definition of “at most” and “at least” and fitting the rather complicated induction/recursion schemes into the type theory of Coq.</p>
</blockquote></li>
</ul>

<p>there are some part-implementations of surreal arithmetic for a game called <a href="http://www.geometer.org/mathcircles/hackenbush.pdf" rel="nofollow">hackenbush</a> (Davis) popularized by Conway, Berlekamp, and Guy of which there are a few references.</p>

<p>Go is indeed one of the leading edge areas of game AI research (considered <em>significantly harder than chess</em> which occupied AI for decades) but it appears there is little research specifically into using surreal numbers to model/ play it. Go is considered a frontier for machine learning/AI algorithms because it also has a relatively unique status/ distinction in that the best software based algorithms ("still/ currently") do not outperform champion human players.</p>

<p>see this ref <a href="http://www.wired.com/2014/05/the-world-of-computer-go/" rel="nofollow">The Mystery of Go, the Ancient Game That Computers Still Can’t Win</a> (Wired mag) for a decent rough survey of current Go AI techniques/ researchers/ leads.</p>

CC BY-SA 3.0
2014-10-05T17:40:08.903Z
2014-10-05T17:40:08.903Z
vzn
<p>Here is an implementation of Surreal Numbers in a relatively new language, Julia. 
<a href="https://github.com/mroughan/SurrealNumbers.jl" rel="nofollow noreferrer">https://github.com/mroughan/SurrealNumbers.jl</a></p>

<p>Described at
<a href="https://www.sciencedirect.com/science/article/pii/S2352711018302152" rel="nofollow noreferrer">https://www.sciencedirect.com/science/article/pii/S2352711018302152</a></p>

CC BY-SA 4.0
2019-04-04T23:55:12.263Z
2019-04-04T23:55:12.263Z
Matt
<p>There is a very nice construction by Conway of surreal numbers. They are "numbers" that contain both real numbers and ordinals, are totally ordered, and have all the properties of a field (except they do not form a set but a class).</p>

<p>See for instance <a href="http://web.mit.edu/sp.268/www/2010/surreal.pdf">this pdf</a> or <a href="http://en.wikipedia.org/wiki/Surreal_number">Wikipedia</a> for an introduction.</p>

<p>They can be even more generalized to so-called "games", which are originally introduced to study combinatorial games. The original motivation of Conway was to analyze the <a href="http://en.wikipedia.org/wiki/Go_%28game%29">game of Go</a>, in particular the endgame is especially suited to be modeled with "surreal games".</p>

<p>My question is: do you know if anybody has implemented this approach in an AI (i.e. computer player) to improve its level at a game? I am especially interested in the case of Go, but others as well. If not, is there an obstacle or a reason why it would not be a good idea?</p>

CC BY-SA 3.0
2015-11-22T21:17:22.560Z
According to the book "Mathematical Go", it seems there used to be a companion program by Raymond Chen for solving the endgame problems in the book, but I do not know where it can be found. I also have a vague memory of Berlekamp referencing "Go explorer", which might be mentioned in the paper "Smart game board and go explorer: a study in software and knowledge engineering". I do not think combinatorial game theory is really used in the top Go playing programs at this time, though.
Mark S.
CC BY-SA 4.0
2018-07-06T21:00:13.157Z
If I recall correctly (maybe not as it was a long time ago), according to David Wolfe (co-author of Mathematical Go), one can concoct Go end-game positions where top professional players tend to play non-optimally by as much as a point, whereas the Conway/Berlekamp/Wolfe game-theory approach allows one to compute the optimum relatively easily.  However, such positions are contrived. This phenomenon is rare in games that arise in real play.
Neal Young
<reference-request><gt.game-theory><implementation><board-games><combinatorial-game-theory>
Implementation of surreal numbers for games
Denis
# Implementation of surreal numbers for games

(Asked by: username_0 on 2014-10-03)

There is a very nice construction by Conway of surreal numbers. They are "numbers" that contain both real numbers and ordinals, are totally ordered, and have all the properties of a field (except they do not form a set but a class).

See for instance [this pdf](http://web.mit.edu/sp.268/www/2010/surreal.pdf) or [Wikipedia](http://en.wikipedia.org/wiki/Surreal_number) for an introduction.

They can be even more generalized to so-called "games", which are originally introduced to study combinatorial games. The original motivation of Conway was to analyze the [game of Go](http://en.wikipedia.org/wiki/Go_%28game%29), in particular the endgame is especially suited to be modeled with "surreal games".

My question is: do you know if anybody has implemented this approach in an AI (i.e. computer player) to improve its level at a game? I am especially interested in the case of Go, but others as well. If not, is there an obstacle or a reason why it would not be a good idea?

**Tags:** reference-request, gt.game-theory, implementation, board-games, combinatorial-game-theory
> **Comments:**
> **username_1**: According to the book "Mathematical Go", it seems there used to be a companion program by Raymond Chen for solving the endgame problems in the book, but I do not know where it can be found. I also have a vague memory of Berlekamp referencing "Go explorer", which might be mentioned in the paper "Smart game board and go explorer: a study in software and knowledge engineering". I do not think combinatorial game theory is really used in the top Go playing programs at this time, though.  
> **username_2**: If I recall correctly (maybe not as it was a long time ago), according to David Wolfe (co-author of Mathematical Go), one can concoct Go end-game positions where top professional players tend to play non-optimally by as much as a point, whereas the Conway/Berlekamp/Wolfe game-theory approach allows one to compute the optimum relatively easily.  However, such positions are contrived. This phenomenon is rare in games that arise in real play.  

---

## 3 answers

### Answer by username_3 on 2014-10-05. Score: 8

I don't have an answer to your question of whether the theory of Conway games has been used in building game-playing programs, but still you might be interested in the [Combinatorial Game Suite](http://cgsuite.sourceforge.net/), "an open-source program to aid research in combinatorial game theory" (which I first learned about [here](https://mathoverflow.net/a/150947/1015)). It includes an implementation of various standard operations on Conway games in canonical form, as well as a scripting language for describing new games.


---

### Answer by username_4 on 2014-10-05. Score: 3

on some search there do not seem to be much published general implementations of surreal numbers. heres an implementation of surreal numbers in [coq](http://en.wikipedia.org/wiki/Coq).

* [Surreal numbers in coq](http://dl.acm.org/citation.cfm?id=2150520) / Mamane, TYPES'04 Proceedings of the 2004 international conference on Types for Proofs and Programs

  > Surreal Numbers form a totally ordered (commutative) Field, containing copies of the reals and (all) the ordinals. I have encoded most of the Ring structure of surreal numbers in Coq. This encoding relies on Aczel's encoding of set theory in type theory.
  >
  > This paper discusses in particular the definitional or proving points where I had to diverge from Conway's or the most natural way, like separation of simultaneous induction-recursion into two inductions, transforming the definition of the order into a mutually inductive definition of “at most” and “at least” and fitting the rather complicated induction/recursion schemes into the type theory of Coq.

there are some part-implementations of surreal arithmetic for a game called [hackenbush](http://www.geometer.org/mathcircles/hackenbush.pdf) (Davis) popularized by Conway, Berlekamp, and Guy of which there are a few references.

Go is indeed one of the leading edge areas of game AI research (considered *significantly harder than chess* which occupied AI for decades) but it appears there is little research specifically into using surreal numbers to model/ play it. Go is considered a frontier for machine learning/AI algorithms because it also has a relatively unique status/ distinction in that the best software based algorithms ("still/ currently") do not outperform champion human players.

see this ref [The Mystery of Go, the Ancient Game That Computers Still Can’t Win](http://www.wired.com/2014/05/the-world-of-computer-go/) (Wired mag) for a decent rough survey of current Go AI techniques/ researchers/ leads.


---

### Answer by username_5 on 2019-04-04. Score: 2

Here is an implementation of Surreal Numbers in a relatively new language, Julia.
<https://github.com/mroughan/SurrealNumbers.jl>

Described at
<https://www.sciencedirect.com/science/article/pii/S2352711018302152>


---

