An environment implementing the toy text "Frozen Lake" game.
Actions:
Rewards:
import {FrozenLake} from "gym-js"; let mapSize=4,p=0.8,isSlippery=false; const env = new FrozenLake(mapSize, p, isSlippery); console.log(env.action_space.toString()); > Discrete: 4 // 4 possible movements console.log(env.observation_space.toString()); > Discrete: 16 // 4x4 map let action = env.action_space.sample(); let [obs, rew, done, info] = env.step(action);
The size of the map
The probability of not slipping
Set the ice to slippery or not. This makes the agent move in a random direction with probability 1-p.
1-p
Generated using TypeDoc
An environment implementing the toy text "Frozen Lake" game.
Actions:
Rewards:
import {FrozenLake} from "gym-js"; let mapSize=4,p=0.8,isSlippery=false; const env = new FrozenLake(mapSize, p, isSlippery); console.log(env.action_space.toString()); > Discrete: 4 // 4 possible movements console.log(env.observation_space.toString()); > Discrete: 16 // 4x4 map let action = env.action_space.sample(); let [obs, rew, done, info] = env.step(action);