Skip to content
Austere Grim edited this page Sep 6, 2022 · 25 revisions

About Forge's Artificial Intelligence

The AI is not "trained". It uses basic rules and can be easy to overcome knowing it's weaknesses.

The AI is;

  • Best with Aggro and midrange decks
  • Poor to Ok in control decks
  • Pretty bad for most combo decks

If you want to train a model for the AI, please do. We would love to see something like that implemented in Forge.

AI matches from command line

Syntax: forge.exe sim -d <deck1[.dck]> ... <deckX[.dck]> -D [path] -n [N] -f [F] -t [T] -p [P] -q

  • sim - "Simulation Mode" forces Forge to not start the GUI and automatically runs the AI matches in command line. Enables all other switches for simulation mode.
  • -d <deck1[.dck]> ... <deckX[.dck]> - Location of deck file or folder of deck files. (Path must be quoted when the path contains spaces)
    • deck1.dck - A deck file to be used in the AI Match (treated as file if it ends with a dot followed by three numbers or letters)
    • deck - A deck folder relative to the execution of the Forge binary.
  • -D [path] - [path] Absolute directory path to load decks from.
  • -n [N] - [N] number of games. Default is 1.
  • -m [M] - [M] number of matches in a game, best of [M] matches. (Overrides -n) Default is 1. Recommended 1, 3, or 5.
  • -f [F] - [F] format of games. Default is "constructed" (other options may not work, list extracted from code)
    • Commander
    • Oathbreaker
    • TinyLeaders
    • Brawl
    • MomirBasic
    • Vanguard
    • MoJhoSto
  • -t [T] - for Tournament Mode, [T] for type of tournament.
  • -p [P] - [P] number of players, only used in tournament mode. Default is 2.
  • -q - Quiet Mode, only prints the result not the entire log.

Basically, what you do is open up a cmd window in the folder where you have Forge. And run it like this:

.\forge.exe sim -d deck1 deck2 -n 3

It's not really setup to work in "first to X wins" matches right now, although since the AI doesn't sideboard running 3 games should give you what you're looking for. Additionally, it'll run in the background (not print to the command line) and outputs to the standard forge.log as it plays. It's fairly rudimentary, but each game ends with an announcement of the winner, and the current status of the match.

Clone this wiki locally