# JSON-Bag: A generic game trajectory representation

arXiv: https://arxiv.org/abs/2508.00712 · HTML: https://mlsanity.com/paper/2508.00712/

## Key facts

- Cited by 1 papers in the map (data through 14 Oct 2026).
- Builds on 8 of its 29 references that are in the map.
- First posted on arXiv 1 Aug 2025.

## Builds on (most cited first, 8 of 8)

- [Mastering Chess and Shogi by Self-Play with a General Reinforcement Learning Algorithm](https://mlsanity.com/paper/1712.01815/) (2017)
- [Illuminating search spaces by mapping elites](https://mlsanity.com/paper/1504.04909/) (2015)
- [Ludii -- The Ludemic General Game System](https://mlsanity.com/paper/1905.05013/) (2019)
- [Automated Game Design via Conceptual Expansion](https://mlsanity.com/paper/1809.02232/) (2018)
- [Transforming Exploratory Creativity with DeLeNoX](https://mlsanity.com/paper/2103.11715/) (2021)
- [The N-Tuple Bandit Evolutionary Algorithm for Game Agent Optimisation](https://mlsanity.com/paper/1802.05991/) (2018)
- [Novelty Search for Deep Reinforcement Learning Policy Network Weights by Action Sequence Edit Metric Distance](https://mlsanity.com/paper/1902.03142/) (2019)
- [A Comparison of Methods for Player Clustering via Behavioral Telemetry](https://mlsanity.com/paper/1407.3950/) (2014)

## Built on by (most cited first, 1 of 1)

- [Game-Agnostic Value Functions through Automatic JSON Feature Extraction](https://mlsanity.com/paper/2608.30056/) (2026)

## Abstract (arXiv)

We introduce JSON Bag-of-Tokens model (JSON-Bag) as a method to generically represent game trajectories by tokenizing their JSON descriptions and apply Jensen-Shannon distance (JSD) as distance metric for them. Using a prototype-based nearest-neighbor search (P-NNS), we evaluate the validity of JSON-Bag with JSD on six tabletop games: 7 Wonders, Dominion, Sea Salt and Paper, Can't Stop, Connect4, Dots and boxes; each over three game trajectory classification tasks: classifying the playing agents, game parameters, or game seeds that were used to generate the trajectories. Our approach outperforms a baseline using hand-crafted features in the majority of tasks. Evaluating on N-shot classification suggests using JSON-Bag prototype to represent game trajectory classes is also sample efficient. Additionally, we demonstrate JSON-Bag ability for automatic feature extraction by treating tokens as individual features to be used in Random Forest to solve the tasks above, which significantly improves accuracy on underperforming tasks. Finally, we show that, across all six games, the JSD between JSON-Bag prototypes of agent classes highly correlates with the distances between agents' policies.
