Spaces:
Sleeping
Sleeping
File size: 497 Bytes
c2736e9 672c110 c2736e9 672c110 c2736e9 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | import random
from server.models import NationAction, NationObservation
class RandomAgent:
"""A baseline agent that outputs random continuous bids for the 6 sectors."""
def __init__(self, seed: int | None = None):
self.rng = random.Random(seed)
def act(self, obs: NationObservation) -> NationAction:
"""Returns 6 random floats between -1.0 and 1.0."""
bids = [self.rng.uniform(-1.0, 1.0) for _ in range(6)]
return NationAction(bids=bids)
|