Spaces:
Sleeping
Sleeping
Andrei Cozma
commited on
Commit
·
d678220
1
Parent(s):
ce936fe
Updates
Browse files- MonteCarloAgent.py → MCAgent.py +7 -4
- agents.py +1 -1
MonteCarloAgent.py → MCAgent.py
RENAMED
@@ -1,16 +1,19 @@
|
|
1 |
-
import os
|
2 |
import numpy as np
|
3 |
-
import gymnasium as gym
|
4 |
from tqdm import tqdm
|
|
|
5 |
import wandb
|
6 |
-
from .Shared import Shared
|
7 |
|
8 |
class MCAgent(Shared):
|
|
|
9 |
def __init__(
|
10 |
self,
|
|
|
|
|
|
|
|
|
11 |
**kwargs,
|
12 |
):
|
13 |
-
super().__init__(**kwargs)
|
14 |
self.reset()
|
15 |
|
16 |
def reset(self):
|
|
|
|
|
1 |
import numpy as np
|
|
|
2 |
from tqdm import tqdm
|
3 |
+
from Shared import Shared
|
4 |
import wandb
|
|
|
5 |
|
6 |
class MCAgent(Shared):
|
7 |
+
|
8 |
def __init__(
|
9 |
self,
|
10 |
+
env_name="CliffWalking-v0",
|
11 |
+
gamma=0.99,
|
12 |
+
epsilon=0.1,
|
13 |
+
run_name=None,
|
14 |
**kwargs,
|
15 |
):
|
16 |
+
super().__init__(env_name, gamma, epsilon, run_name, **kwargs)
|
17 |
self.reset()
|
18 |
|
19 |
def reset(self):
|
agents.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
# All supported agents
|
2 |
-
from
|
3 |
from DPAgent import DPAgent
|
4 |
|
5 |
AGENTS_MAP = {
|
|
|
1 |
# All supported agents
|
2 |
+
from MCAgent import MCAgent
|
3 |
from DPAgent import DPAgent
|
4 |
|
5 |
AGENTS_MAP = {
|