--- tags: - FrozenLake-v2-4x4 - q-learning - reinforcement-learning - custom-implementation model-index: - name: q-FrozenLake-v2-4x4-Slippery results: - task: type: reinforcement-learning name: reinforcement-learning dataset: name: FrozenLake-v2-4x4 type: FrozenLake-v2-4x4 metrics: - type: mean_reward value: 0.51 +/- 0.50 name: mean_reward verified: false --- # **Q-Learning** Agent playing **FrozenLake-v2** - This is a trained model of a **Q-Learning** agent playing **FrozenLake-v2**. The **goal** of the agent is to navigate from starting state to the goal state by walking only on Frozen tiles and avoid holes. - The environment support two different sizes: `4x4` and `8x8`grids - The environment has two modes: - `is_slippery=True` agent may not move in the desired direction due to the slippery nature of the tails. - `is_slippery=False` agent moves in the desired direction due to the non-slippery nature of the tails. - How to create the FrozenLake environment? - ```gym.make("FrozenLake-v1", desc=None, map_name="4x4", is_slippery=True, render_mode="rgb_array")``` - `desc=None` specify non-predetermined maps, `map_name` will be used. You can also specify custom map like ```desc = ["SFFH", "HFHF", "FFHF", "HFFG"]```. If both are None, random `8x8` map with `80%` of locations frozen will be generated. ## Usage ```python model = load_from_hub(repo_id="HugeFighter/q-FrozenLake-v2-4x4-Slippery", filename="q-learning.pkl") # Don't forget to check if you need to add additional attributes (is_slippery=False etc) env = gym.make(model["env_id"]) ```