The game of snake. Made with Phaser.
Phaser
Observations are the pixels of the game of default size [640, 480, 3];
[640, 480, 3]
Game code adapted from https://labs.phaser.io/view.html?src=src\games\snake\part7.js
import {Snake} from "gym-js"; const env = new Snake(); console.log(env.action_space.toString()); > console.log(env.observation_space.toString()); > let action = env.action_space.sample(); let [obs, rew, done, info] = env.step(action);
A configuration object, detailing the game settings. See the default config below.
Possible Actions:
The pixel values of the game (640x480).
The value of eating the food:
Generated using TypeDoc
The game of snake. Made with
Phaser
.Observations are the pixels of the game of default size
[640, 480, 3]
;Game code adapted from https://labs.phaser.io/view.html?src=src\games\snake\part7.js
import {Snake} from "gym-js"; const env = new Snake(); console.log(env.action_space.toString()); > console.log(env.observation_space.toString()); > let action = env.action_space.sample(); let [obs, rew, done, info] = env.step(action);