exporting to mongo is now even better then befor
This commit is contained in:
@@ -40,13 +40,13 @@ env_config = {
|
||||
# The order in which components reset, step, and generate obs follows their listed order below.
|
||||
'components': [
|
||||
# (1) Building houses
|
||||
('Craft', {'skill_dist': "pareto", 'commodities': ["Gem"],'max_skill_amount_benefit':2}),
|
||||
('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': 15
|
||||
'Gem': 90
|
||||
}}),
|
||||
],
|
||||
|
||||
@@ -58,14 +58,14 @@ env_config = {
|
||||
|
||||
# ===== STANDARD ARGUMENTS ======
|
||||
# kwargs that are used by every Scenario class (i.e. defined in BaseEnvironment)
|
||||
'agent_composition': {"BasicMobileAgent": 5,"TradingAgent":10}, # Number of non-planner agents (must be > 1)
|
||||
'agent_composition': {"BasicMobileAgent": 2,"TradingAgent":5}, # 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,
|
||||
'allow_observation_scaling': True,
|
||||
'dense_log_frequency': 100,
|
||||
'world_dense_log_frequency':1,
|
||||
'energy_cost':0,
|
||||
'energy_cost':0.2,
|
||||
'energy_warmup_method': "auto",
|
||||
'energy_warmup_constant': 4000,
|
||||
|
||||
@@ -82,7 +82,6 @@ env_config = {
|
||||
'flatten_masks': True,
|
||||
}
|
||||
|
||||
|
||||
num_frames=1
|
||||
CONNECTION_STRING = "mongodb://root:econ@localhost:27017/"
|
||||
class TensorboardCallback(BaseCallback):
|
||||
@@ -255,7 +254,7 @@ while True:
|
||||
# trades=market.get_dense_log()
|
||||
build=craft.get_dense_log()
|
||||
met=econ.previous_episode_metrics
|
||||
printReplay(econ,5)
|
||||
#printReplay(econ,5)
|
||||
#printMarket(trades)
|
||||
#printBuilds(builds=build)
|
||||
print("social/productivity: {}".format(met["social/productivity"]))
|
||||
|
||||
Reference in New Issue
Block a user