Code for Yonadav Shavit's Masters Thesis, "Learning Environment Representations from Sparse Signals"
The code was written for Tensorflow 1.0 or later, and the system heavily utilizes Tensorboard for visualizing learned embeddings.
For an in-depth explanation of the algorithm, see this blog post.
Table of Contents
train_model.py is the primary file for running experiments, including training and visualizing environment models.
python train_model.py -h for the possible pre-configured experiments you can run.
model.EnvModel defines the environment-simulating network architecture.
EnvModel and implements functions to gather environment training data and train the model.
configs.py contains a large set of possible experiment configurations, and a simple interface for defining new experiments.
agents.py defines different RL agents utilizing the learned models, including a BFS-based planner and a random-rollout planner.
test_planning.py lets you compare an agent's learned environment representation to the real environment.
It does this by letting you take actions and displaying side-by-side the true state and the agent's best guess of the current state.
bfs_analytics.py generate the respective figures for Chapter 3, Chapter 4, and the final model-based agents' performance.
(A learned environment embedding)