Skip to content

Commit

Permalink
coef ent
Browse files Browse the repository at this point in the history
  • Loading branch information
thatguy11325 committed Mar 14, 2024
1 parent 7b13e7f commit 9551efa
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions pokemonred_puffer/cleanrl_puffer.py
Original file line number Diff line number Diff line change
@@ -1,25 +1,23 @@
import math
import os
import random
import time
from collections import deque
from types import SimpleNamespace
from typing import Any, Callable
import uuid
from collections import defaultdict
from collections import defaultdict, deque
from datetime import timedelta
from types import SimpleNamespace
from typing import Any, Callable

import numpy as np
import torch
import torch.nn as nn
import torch.optim as optim

import pufferlib
import pufferlib.emulation
import pufferlib.frameworks.cleanrl
import pufferlib.policy_pool
import pufferlib.utils
import pufferlib.vectorization
import torch
import torch.nn as nn
import torch.optim as optim

from pokemonred_puffer.eval import make_pokemon_red_overlay
from pokemonred_puffer.global_map import GLOBAL_MAP_SHAPE

Expand Down Expand Up @@ -440,7 +438,7 @@ def evaluate(self):
self.events_avg.append(np.mean(self.infos["learner"]["stats/event"]))
if (
len(self.events_avg) == self.events_avg.maxlen
and math.abs(self.events_avg[-1] - self.events_avg[0]) < 3
and abs(self.events_avg[-1] - self.events_avg[0]) < 3
):
self.ent_coef = self.config.ent_coef * 1.25
else:
Expand Down

0 comments on commit 9551efa

Please sign in to comment.