https://github.com/gaborvecsei/somnium-doctrina
https://github.com/gaborvecsei/somnium-doctrina
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/gaborvecsei/somnium-doctrina
- Owner: gaborvecsei
- Created: 2018-09-11T14:42:42.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-09-20T10:32:49.000Z (almost 8 years ago)
- Last Synced: 2024-12-29T17:16:59.102Z (over 1 year ago)
- Language: Python
- Size: 8.79 KB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Somnium Doctrina - Learning in Dreams
In this repo we will try to teach an abstract representation of the world (we referr to this as the *dream*) to our agent and then
try to make it learn inside the dream.
## Grund integration and minimal documentation
The environment, which we are trying to learn is Match from grund.
To access it, grund has to be installed:
```
pip3 install https://github.com/csxeba/grund
```
A minimally configured Match environment can be set up and used to produce random states and rewards:
```python
import cv2
from grund.match import MatchConfig, Match
cfg = MatchConfig(
canvas_size=[240, 180],
players_per_side=3
)
env = Match(cfg)
for states, rewards in (env.random_state(batch_size=32) for _ in range(10)):
for state, reward in zip(states, rewards):
cv2.imshow("States", state)
cv2.waitKey(100)
```