environment test

This commit is contained in:
2023-10-26 01:43:56 +08:00
commit 49529a9400
14 changed files with 554 additions and 0 deletions

1
agent/__init__.py Normal file
View File

@@ -0,0 +1 @@
from .util import create_create_agent

12
agent/util.py Normal file
View File

@@ -0,0 +1,12 @@
from recsim.agents import full_slate_q_agent
def create_create_agent(agent=full_slate_q_agent.FullSlateQAgent):
def create_agent(sess, environment, eval_mode, summary_writer=None):
kwargs = {
'observation_space': environment.observation_space,
'action_space': environment.action_space,
'summary_writer': summary_writer,
'eval_mode': eval_mode,
}
return agent(sess, **kwargs)
return create_agent