# Go
The `go` command tells the engine to start calculating on the current position (as set up by the [[position]] command).
Each `go` command must be eventually responded to with [[bestmove]], once the search is completed or interrupted.
## Subcommands
The subcommands to `go` may be used to restrict the search, or to inform the engine of conditions such as the remaining time on the clock.
### Search Moves
`searchmoves <move1> ... <movei>`
Restrict the engine to only consider certain initial moves in it's search.
For example:
```
position startpos
go searchmoves e2e4 d2d4
```
instructs the engine to select between double pushing the queen pawn and double pushing the king pawn as it's opening move.
---
### Ponder
`ponder`
Indicates that the final move in the previous [[position]] command is the suggested move to ponder on (The engine should begin searching for a response as though that move has been made, but the GUI could have guessed incorrectly).
The engine may elect to ignore the GUI's suggestion as to which move to ponder on.
Example:
```
position startpos e2e4
go ponder
```
The engine, playing as black, is asked to ponder which move to respond to white's opening with, while the human player decides what to play. The GUI has suggested that the engine should guess that white will double push their king pawn.
---
### Time Commands
`wtime <x>`, `btime <x>`, `winc <x>`, and `binc <x>` tell the engine how much time each player has left on the clock, and how much time is added for each move, all measured in milliseconds.
`movestogo <x>` tells the engine the number of halfmoves until the next time control. (After this many halfmoves, the clock will be reset to a new countdown and increment).
Example:
```
go wtime 600000 btime 600000 winc 30000 binc 30000 movestogo 40
```
White and black both have 10 minutes on the clock, and 30 seconds are added for each move played. After 40 halfmoves, a
---
### Tree Restrictions
`depth <x>` tells the engine to only consider at most `<x>` halfmoves ahead of the current position before finishing the search.
`nodes <x>` tells the engine to only evaluate at most `<x>` distinct positions of the board before finishing the search.
`mate <x>` tells the engine to search for a forced checkmate in `<x>` moves. (The standard is unclear as to what to do if mate is not found.)
---
### Search Time
`movetime <x>` tells the engine to spend no more than `<x>` milliseconds searching.
---
### Infinite
`infinite` tells the engine to continue searching until interrupted by the [[stop]] command.