Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why base resources always is 0 #141

Open
hsushuai opened this issue Oct 1, 2024 · 1 comment
Open

Why base resources always is 0 #141

hsushuai opened this issue Oct 1, 2024 · 1 comment

Comments

@hsushuai
Copy link

hsushuai commented Oct 1, 2024

I am trying to use the map maps/8x8/basesWorkers8x8.xml, why does obs always get 0 resources for the base? How can I know how many resources the player has?

env = MicroRTSGridModeVecEnv(
    num_selfplay_envs=0,
    num_bot_envs=1,
    max_steps=2000,
    render_theme=2,
    ai2s=[microrts_ai.coacAI for _ in range(1)],
    map_paths=[map_name],
    reward_weight=np.array([10.0, 1.0, 1.0, 0.2, 1.0, 4.0]),
    autobuild=False,
)
env.metadata["video.frames_per_second"] = args.video_fps

name_prefix = map_name.split("maps/")[-1].split(".xml")[0].replace("/", "-")
env = VecVideoRecorder(
    env,
    "videos",
    record_video_trigger=lambda x: True,
    video_length=args.video_length,
    name_prefix=name_prefix,
)

obs = env.reset()
@hsushuai
Copy link
Author

hsushuai commented Oct 1, 2024

I used v0.6.1 version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant