Farama-Foundation / Farama-Foundation/MicroRTS-Py

Why base resources always is 0

Open
#141 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
292
Forks
65
PR merge metrics
No merged PRs in 30d

Description

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?

```python
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()
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.