LOCM artwork

Strategy Card Game AI Competition

Legends of Code and Magic (LOCM) is a small implementation of a Strategy Card Game, designed to perform AI research. Its advantage over the real cardgame AI engines is that it is much simpler to handle by the agents, and thus allows testing more sophisticated algorithms and quickly implement theoretical ideas.

Its goal is to encourage advanced research, free of drawbacks of working with the full-fledged game. It means i.a., embedding deckbuilding into the game itself (limiting the usage of premade decks), and allowing efficient search beyond the one turn depth. All cards effects are deterministic, thus nondeterminism is introduced only by the ordering of cards and an unknown opponent's deck. The game board consists of two lines (similar to TES:Legends on which LOCM is based), favoring deeper strategic thinking.

Because of the domain's properties, Strategy Card Games are a very suitable subject for evolutionary-based approaches. First, as in other multi-action games, rolling horizon evolution is considered, alongside MCTS, one of the best-performing search algorithm. Second, as the game contains many parameters used in repeatable context (card statistics and keywords), there are multiple opportunities to treat parts of the game as an optimization problem (board evaluation, arena draft evaluation), which can be successfully tackled by evolution.

The current edition introduces "Constructed Mode," where an agent will be presented with a set of randomly generated cards before each game, and it has to create its deck using these cards. Thus, the deckbuilding is dynamic and cannot be simply reduced to using human-created top-meta decks, but is less random and gives more control for the agent than the Arena Mode. The new version of the game also introduces cards with Area of Effect, which was the most important feature standard in other card games but so far missing in LOCM.

Screen 0 Screen 1 Screen 2
Screen 3 Screen 4 Screen 5


Competition Summary Video

Winner: ByteRL Results table Results graph
Detailed results data
(including sources of the agents)

Prizes have been sponsored by
Computation hardware have been sponsored by
Digital Ocean

Bonus results for LOCM 1.2 run

Results table
Detailed results data
(including sources of the agents)