exporting to mongo is now even better then befor
This commit is contained in:
@@ -41,11 +41,11 @@ env_config = {
|
||||
# (1) Building houses
|
||||
('Craft', {'skill_dist': "pareto", 'commodities': ["Gem"],'max_skill_amount_benefit':1.5}),
|
||||
# (2) Trading collectible resources
|
||||
('ContinuousDoubleAuction', {'max_num_orders': 10}),
|
||||
('ContinuousDoubleAuction', {'max_num_orders': 10,'max_bid_ask':100}),
|
||||
# (3) Movement and resource collection
|
||||
('SimpleGather', {}),
|
||||
('ExternalMarket',{'market_demand':{
|
||||
'Gem': 11
|
||||
'Gem': 65
|
||||
}}),
|
||||
],
|
||||
|
||||
@@ -57,7 +57,7 @@ env_config = {
|
||||
|
||||
# ===== STANDARD ARGUMENTS ======
|
||||
# kwargs that are used by every Scenario class (i.e. defined in BaseEnvironment)
|
||||
'agent_composition': {"BasicMobileAgent": 10,"TradingAgent":10}, # Number of non-planner agents (must be > 1)
|
||||
'agent_composition': {"BasicMobileAgent": 10,"TradingAgent":2}, # Number of non-planner agents (must be > 1)
|
||||
'world_size': [5, 5], # [Height, Width] of the env world
|
||||
'episode_length': 256, # Number of timesteps per episode
|
||||
'isoelastic_eta':0.001,
|
||||
@@ -97,7 +97,7 @@ eval_env_config = {
|
||||
# (1) Building houses
|
||||
('Craft', {'skill_dist': "pareto", 'commodities': ["Gem"],'max_skill_amount_benefit':1.5}),
|
||||
# (2) Trading collectible resources
|
||||
('ContinuousDoubleAuction', {'max_num_orders': 10}),
|
||||
('ContinuousDoubleAuction', {'max_num_orders': 10,'max_bid_ask':100}),
|
||||
# (3) Movement and resource collection
|
||||
('SimpleGather', {}),
|
||||
('ExternalMarket',{'market_demand':{
|
||||
@@ -113,7 +113,7 @@ eval_env_config = {
|
||||
|
||||
# ===== STANDARD ARGUMENTS ======
|
||||
# kwargs that are used by every Scenario class (i.e. defined in BaseEnvironment)
|
||||
'agent_composition': {"BasicMobileAgent": 20,"TradingAgent":5}, # Number of non-planner agents (must be > 1)
|
||||
'agent_composition': {"BasicMobileAgent": 10,"TradingAgent":10}, # Number of non-planner agents (must be > 1)
|
||||
'world_size': [1, 1], # [Height, Width] of the env world
|
||||
'episode_length': 256, # Number of timesteps per episode
|
||||
'allow_observation_scaling': True,
|
||||
@@ -295,6 +295,8 @@ model_db=[None,None] # object for storing model
|
||||
|
||||
model = MaskablePPO("MlpPolicy",n_steps=int(env_config['episode_length']*2),ent_coef=0.001, vf_coef=0.5 ,gamma=0.99, learning_rate=4e-4,env=stackenv_basic, seed=500,verbose=1,device="cuda",tensorboard_log="./log")
|
||||
model_trade=MaskablePPO("MlpPolicy",n_steps=int(env_config['episode_length']*2),ent_coef=0.001, vf_coef=0.5 ,gamma=0.99, learning_rate=4e-4,env=stackenv_traid, seed=500,verbose=1,device="cuda",tensorboard_log="./log")
|
||||
model=model.load("basic.ai",stackenv_basic)
|
||||
model_trade=model_trade.load("trade.ai",stackenv_traid)
|
||||
|
||||
n_agents=econ.n_agents
|
||||
|
||||
|
||||
Reference in New Issue
Block a user