mirror of
https://github.com/illiumst/marl-factory-grid.git
synced 2025-07-05 17:11:35 +02:00
major redesign ob observations and entittes
This commit is contained in:
15
algorithms/static/random_agent.py
Normal file
15
algorithms/static/random_agent.py
Normal file
@ -0,0 +1,15 @@
|
||||
from random import randint
|
||||
|
||||
from algorithms.static.TSP_base_agent import TSPBaseAgent
|
||||
|
||||
future_planning = 7
|
||||
|
||||
|
||||
class TSPRandomAgent(TSPBaseAgent):
|
||||
|
||||
def __init__(self, n_actions, *args, **kwargs):
|
||||
super(TSPRandomAgent, self).__init__(*args, **kwargs)
|
||||
self.n_action = n_actions
|
||||
|
||||
def predict(self, *_, **__):
|
||||
return randint(0, self.n_action - 1)
|
Reference in New Issue
Block a user