CLI Usage

IkaSolver includes a command-line interface (CLI) for running solves without the GUI. The CLI is ideal for headless servers, batch processing, and remote solving. It reads .tree files, runs the MCCFR solver, and outputs .iks strategy files.

License Activation

The first time you run the CLI, it prompts for license activation interactively. Enter your license key when asked. Once activated, the license is stored locally and subsequent runs proceed automatically.

$ ikasolver --tree game.tree -i 100000 -o result.iks
IkaSolver v1.0.0
Enter license key: ****-****-****-****
License activated successfully.

To deactivate the license (e.g., to move it to a different machine):

$ ikasolver --remove-license

Deactivation can only be done once every 30 days.

Basic Solve

The simplest usage: provide a tree file, iteration count, and output path:

ikasolver --tree game.tree -i 1000000 -o result.iks

This loads game.tree, runs 1,000,000 iterations using all available CPU cores, and saves the result to result.iks.

While running, the CLI displays a live status panel on stderr:

  Status              Running     00:02:34
  Threads             8
  Iterations          524,288
  Speed               412k/s
  Nodes               12,847
  Iterations/Nodes    40.8
  Volatility          0.842
  Memory              2.1 GB
  BTN EV              142 mchip       7.1 bb/100
  BB EV               -142 mchip      -7.1 bb/100

Press Ctrl+C to stop the solve gracefully. If an output path was specified, the current results are saved before exiting.

RAM Estimation

Before committing to a long solve, check memory requirements:

ikasolver --tree game.tree --ram

This parses the tree, calculates the memory breakdown, prints it, and exits without running the solver. Use this to verify your machine has enough RAM before starting.

Remote Serving

The CLI can act as a remote solver server, allowing the IkaSolver GUI on another machine to offload solving to a more powerful server:

ikasolver --serve 9876 --token mysecrettoken

This starts a WebSocket server on port 9876. The GUI connects to it via the Remote Server settings.

  • Port defaults to 9876 if you write --serve without a value.
  • Token is an authentication password. If omitted, a random 32-character token is generated and printed to stderr - copy it into the GUI's token field.

The server accepts one client at a time. When the GUI connects, it sends tree and settings data, and the server runs the solve remotely. Results stream back to the GUI in real time.

Common Examples

High-Accuracy Preflop Solve

ikasolver --tree preflop_6max.tree \
  -i 5000000 \
  -j 16 \
  --flop-buckets 50 \
  --turn-buckets 50 \
  --river-buckets 50 \
  --abstraction v2 \
  -o preflop_6max_5M.iks

Uses 16 threads, 50 buckets per street with V2 abstraction for higher accuracy, and runs 5 million iterations.

Cash Game with Rake

ikasolver --tree NL50_6max.tree \
  -i 2000000 \
  --rake 0.05 \
  --rake-cap 60 \
  -o NL50_raked.iks

Solves with 5% rake capped at 60 chips (typical for an online NL50 game with stakes in milli-chips).

Size Optimization

ikasolver --tree preflop_multi_size.tree \
  -i 500000 \
  --optimize-sizes \
  -o optimal_single_size.iks

Runs the solve and then finds the optimal single raise size at each node, removing actions used less than 2% of the time.

Per-Node Iteration Scaling

ikasolver --tree big_tree.tree \
  --in 10 \
  -o big_tree_result.iks

Instead of a fixed iteration count, runs 10 iterations per info set. A tree with 100,000 info sets would run 1,000,000 total iterations. This automatically scales with tree complexity.

Bounty Tournament

ikasolver --tree pko_hu.tree \
  --squid-config bounty_config.json \
  -i 1000000 \
  -o pko_result.iks

Solves with bounty (PKO) payoff adjustments loaded from a JSON configuration file.

Start a Remote Server

ikasolver --serve --token mytoken123

Starts the remote solver on the default port (9876). Connect from the GUI using the server's IP address and port.

Output

The CLI writes .iks files in the same format as the GUI's Save Sim. You can open CLI-generated .iks files in the GUI for visual inspection.

Update Checks

On startup, the CLI checks for available updates (with a 3-second timeout). If a newer version exists, a message is printed:

Update available: v1.1.0 (you have v1.0.0). Download at https://ikasolver.com/dashboard

This check is best-effort and does not block the solve if the network is unavailable.

See Also