Little Go User Manual
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

The computer player

A computer player has many settings, each of which defines a certain technical aspect of how that particular computer player calculates its moves. The settings can be placed into 2 main categories:

  • Settings that affect the computer player’s playing strength.
  • Settings that define the computer player’s resign behaviour.

Read on to learn more.


The “Edit player” screen for computer players

Edit player screen, editing a computer player
  1. Tap the “Done” button when you have finished editing the player’s settings. If the computer player currently participates in a game any changes you made will take effect now.
  2. In this section you manage a couple of basic settings. To change the player’s name simply tap on the name to call up an edit screen. The “Human player” switch is off for computer players, but you can toggle it to turn the player into a human player. Warning: When you toggle the switch the computer player’s settings are discarded!
  3. In this section you control the computer player’s playing strength. You can keep it simple and select from a list of 5 playing strengths, or you can tap “Advanced configuration” to tweak individual options. Read more.
  4. In this section you control the computer player’s resign behaviour. As with the playing strength you can choose from one of 5 resign behaviours, or you can tap “Advanced configuration” to change individual options. Read more.
  5. Here you can edit a computer player’s notes. This is a text of arbitrary length that you can use to describe what settings you chose for this particular computer player. The pre-defined computer players that come with the app use this feature to provide a quick hint how a pre-defined computer player’s settings differ from the settings of the other players.

The background computer player

When a new game with two human players is started there can be situations when the computer’s assistance is required. For instance one of the human players might request the app to calculate a move for them by tapping the Computer Play button. In situations like these the app uses a special background computer player to calculate the move or do other computations.

The background computer player effectively works like an invisible computer player that performs calculations in the background (hence its name). You can change the background computer players’ settings exactly the same as you would do for regular computer players. Changes will have an impact, for instance, on the quality of the moves generated by tapping the Computer Play button.

To re-iterate: The background computer player is used only in human vs. human games.

The Pondering setting is disabled by default for the background computer player. This is by design! Usually players in a human vs. human game do not want to consult the computer player, so if Pondering were enabled by default this would waste a lot of battery power because the computer would be calculating moves in the background all the time. If you would like to improve the playing strength of the background computer player, you should not enable Pondering, but instead increase the Thinking time setting.

Playing strength

The simplest way to change the settings of a computer player is to select from a number of playing strengths when you are on the “Edit player” screen. Playing strength 1 is the weakest, playing strength 2 is slightly better, and so on. Each playing strength represents a different set of predefined settings values. By selecting a playing strength you are effectively changing many of the computer players’ settings with a single tap, without having to understand what the individual settings do.

Individual settings are also open to manual tweaking. To do so, tap the “Advanced configuration” item in the “Playing strength” section of the “Edit player” screen. Before you start changing things, however, it is probably a good idea to first read through the next sections so that you better understand what you can accomplish by manipulating the different settings.

Playing strength settings

Maximum memory

This setting defines how much memory in MB the computer is allowed to use for its calculations.

In general, the more memory it gets, the better the computer will play.

There are a few things that you need to be aware of, though:

  • Most important is that your iPhone or iPad only has a limited amount of memory, and the app must share this memory with all the other apps that also run on the device. If iOS (the operating system running on your device) finds that the app behaves badly and uses up too much memory, it will terminate the app after a short delay so that other apps on the device can continue running. To minimize the chance that this happens, the app limits the amount of memory you can assign here to a fraction of the amount of physical memory that the device has.
  • More threads (see below) usually need more memory to be effective.
  • Faster processors will be happy if they get more memory because they can calculate more than slower processors in the same amount of time

Number of threads

This setting defines how many calculations the computer is allowed to make in parallel.

In general, the more threads it gets, the better the computer will play.

However, the number of threads should not exceed the number of processor cores that your iPhone or iPad has. At best, too many threads will have no detrimental effect, but it may also be that playing strength suffers because the computer is taking up too much time switching between threads when instead it could make better use of this time in a single thread of straightforward calculations.

Note that the iPhone 4S is the first iOS device that has a processor with 2 cores, so on older devices you should leave the number of threads set to 1. If you don’t know how many processor cores your device has, you can consult one of these Wikipedia pages:

Pondering

This setting defines whether the computer is allowed to “think” while it is not its turn.

Turning this setting on allows the computer to play better because it gets more time for its calculations.
Because the processor uses up more energy, this will have a negative impact on your device’s battery life.

Pondering time

This setting defines how long the computer is allowed to “think” while it is not its turn.

In general, more pondering time means stronger play.
Pondering in general is already heavy on your device’s battery, so obviously increased pondering time will make the effect worse.

Reuse subtree

This setting defines whether the computer is allowed to “remember” some of the results of its calculations from the last turn. Turning this setting off forces the computer to forget the results of its calculations once it has made its move. On its next move it will then need to re-calculate some of the very same results that it has just forgotten.

Turning this setting on therefore makes the computer play stronger because it can use its allotted time for making new calculations.

When the Pondering setting is turned on, “reuse subtree” must be turned on as well. The app automatically does this for you, and it will also prevent you from accidentally turning the setting off.

Thinking time

This setting defines how long the computer is allowed to “think” while it is its turn.

In general, more thinking time means stronger play.
The usual equation applies: More computing time = more energy usage = less battery life.

In addition, the “thinking time” setting also has an impact on the user experience: Usually it is desirable that the computer player should not take too long for its turn, and 10 seconds have been found to be a reasonable default value.

Maximum games

This setting defines how many playout games the computer is allowed to calculate before it must decide on a “best move”.

In general, the more playout games the computer is allowed to calculate, the better it will play.

When it is the computer’s turn, it will calculate until either its thinking time has run out, or until the maximum number of calculated playout games has been reached. Which one of the limits is reached first depends on how fast the processor doing the calculations is.

More playout games usually means more time spent computing, which directly translates into more energy used, hence lower battery life.

Limiting the computer’s playing strength

The following thoughts might be helpful if you would like to tweak a computer player’s settings to limit its playing strength.

  • Setting Maximum games to very low values is guaranteed to cripple the computer player, regardless of your device CPU’s number crunching power.
  • Alternatively, you could also lower the value for Thinking time, but if you then use this setting on a new iPhone or iPad the computer player will probably become stronger because the new device has a faster processor, which means it can calculate more in the same amount of time.
  • Assuming you chose Maximum games as the limiting factor, you can simply raise its value to increase the computer’s playing strength until you find the threshold that makes for challenging and engaging games.
  • If you continue to raise the value for Maximum games, at a certain point Thinking time will become the limiting factor because the CPU will not be able to calculate all of the playouts allowed by Maximum games in the allotted time.
  • Tampering with Thinking time is something you will usually want to avoid, though, because you will have to wait longer for your opponent to do its thinking, which means that your user experience will suffer.
  • The best two settings that further affect playing strength therefore are Reuse subtree and Pondering.

Predefined playing strength settings

This section lists the settings that the predefined playing strengths resolve to.

Playing strength 1 Playing strength 2 Playing strength 3 Playing strength 4 Playing strength 5
Maximum games 500 5000 10'000 Unlimited Unlimited
Reuse subtree Disabled Disabled Disabled Enabled Enabled
Pondering Disabled Disabled Disabled Disabled Enabled
Pondering time - - - - 5 minutes
Maximum memory 32 MB 32 MB 32 MB 32 MB 32 MB
Number of threads 1 1 1 1 1
Thinking time 10 seconds 10 seconds 10 seconds 10 seconds 10 seconds
The Maximum memory value 32 MB is rather low because it must cater to the oldest iOS device still supported by the app. If you have a newer iPhone, or an iPad, you may wish to increase the value for maximum memory (and/or the thread count) if you feel that the computer player is too weak for you.

Resign behaviour

A computer player has a resign behaviour which defines how quickly the computer will resign the game. The simple configuration lets you choose from five predefined resign behaviours, while the advanced configuration allows you to define a threshold percentage for each board size.

Here are a couple of ideas on what you can do with specific resign behaviours:

  • If the computer player is allowed to resign normally, it will often resign immediately when it is faced with an overwhelming handicap (e.g. handicap 6 on a 9x9 board). Setting the resign behaviour to “Never resign”, however, allows beginners to play with a large handicap on small boards.
  • Strong players who can beat the computer but who like to play out the game to the very end can set the resign behaviour to “Stubborn” or even to “Never resign” to get the most out of a game.

Resign behaviour settings

Resign threshold

This setting defines how quickly the computer will resign the game. The computer player resigns if the quality of the best move it can find is below the resign threshold.

Lower thresholds make the computer less likely to resign. A threshold of 0% guarantees that the computer will never resign.

Because the computer internally calculates percentages for the quality of its moves, the resign threshold is also expressed in % so that the two values can be compared to each other.

Each board size has its own resign threshold, because on larger boards the computer engine making the calculations (Fuego) tends to generate slightly higher values for “best move quality”.

Resign minimum number of games

This setting defines the minimum number of playout games that the computer must calculate before it is allowed to use the resign threshold to make a decision about resigning. The idea is that a low number of playout games is less likely to result in high quality moves, thus the computer would resign much too quickly when it would be allowed to decide on only a few playout games.

An important consideration for this setting is that the computer will never resign if it has a value that is greater than the value of the playing strength setting Maximum games, because in that case the computer will never calculate more than “Resign minimum number of games”.

To prevent this from accidentally happening, “Resign minimum number of games” is automatically calculated by default. This mechanism makes sure that whenever the value for Maximum games changes, the value for “Resign minimum number of games” is automatically adjusted to stay below Maximum games. Although you can disable this feature, it is recommended that you leave auto-calculation turned on.

This is how auto-calculation for “Resign minimum number of games” works:

Maximum games Resign minimum number of games
More than 5000 5000
More than 100 Maximum games - 50
100 or less Maximum games - 1
The value 5000 is used because it is the default that Fuego uses internally for its resign_min_games setting.

Predefined resign behaviour settings

This section lists the Resign threshold values (in %) for each board size that the predefined resign behaviours resolve to.

Pushover Resign quickly Normal Stubborn Never
Factor 2.0 1.5 1.0 0.5 0.0
Board size 7x7 10% 7.5% 5% 2.5% 0%
Board size 9x9 10% 7.5% 5% 2.5% 0%
Board size 11x11 10% 7.5% 5% 2.5% 0%
Board size 13x13 10% 7.5% 5% 2.5% 0%
Board size 15x15 16% 12% 8% 4% 0%
Board size 17x17 16% 12% 8% 4% 0%
Board size 19x19 16% 12% 8% 4% 0%

Notes:

  1. The resign thresholds of the “Normal” resign behaviour form the baseline. The percentages for “Normal” are taken straight from the defaults that Fuego uses internally for its resign_threshold setting.
  2. The other resign behaviours apply a factor to this baseline as indicated in the “Factor” row. For instance, with the “Pushover” resign behaviour the computer is twice (factor 2.0) as likely to resign as with the “Normal” resign behaviour.
  3. On closer inspection you will see that there are only two board size ranges: 7x7 up to 13x13, and 15x15 up to 19x19. This is again due to the internal defaults of Fuego.
  4. The predefined resign behaviours do not contain a value for Resign minimum number of games because that setting is expected to be auto-calculated.

Mapping to Fuego parameters

For the technically inclined, here is how the computer player settings within the app map to Fuego parameters (actually: GTP commands sent to Fuego).

App setting Fuego parameter
Maximum games uct_param_player max_games
Reuse subtree uct_param_player reuse_subtree
Pondering uct_param_player ponder
Pondering time uct_param_player max_ponder_time
Maximum memory uct_max_memory
Number of threads uct_param_search number_threads
Thinking time go_param timelimit
Resign threshold uct_param_player resign_threshold
Resign minimum number of games uct_param_player resign_min_games