Giter Club home page Giter Club logo

gym-starcraft's Issues

Crashing immediately after launching an example

Include BWAPI error log:
//////////////////////////////////////////////////
TIME: Thu Apr 06 20:29:41 2017

VERSION: 1.16.1.1
BWAPI:
REVISION: 4708
BUILD: RELEASE
ERROR: None
LOCATION: Single Player
MAP: marines_1v1
m5v5_c_far.scm

EXCEPTION: 0xC0000005 EXCEPTION_ACCESS_VIOLATION
FAULT: 0x6BD44F78 czmq.dll
REGISTERS:
EDI: 049D5F30
ESI: 00000000
EBX: 00000000
EDX: 00000000
ECX: 00000000
EAX: 00000000
EBP: 0019F928
EIP: 6BD44F78
ESP: 0019F928
STACK:
czmq.dll 0x6BD44F78 zsock_is
czmq.dll 0x6BD455D0 zsock_resolve
czmq.dll 0x6BD419E6 zmsg_send
czmq.dll 0x6BD4643E zsock_vsend
czmq.dll 0x6BD45642 zsock_send
BWEnv.dll 0x5A876713 newAIModule
BWEnv.dll 0x5A8632F0 ----
BWEnv.dll 0x5A868A48 newAIModule
BWAPI.dll 0x1003471E ----
BWAPI.dll 0x1003496A ----
BWAPI.dll 0x10041BC9 ----
BWAPI.dll 0x100345E7 ----

The truth value of an array with more than one element is ambiguous.

When running the example, I came across an error:
"""
Traceback (most recent call last):
File "random_agent.py", line 30, in
obs, reward, done, info = env.step(action)
File "/Library/Python/2.7/site-packages/gym/core.py", line 122, in step
observation, reward, done, info = self._step(action)
File "/Users/sk/Projects/gym-starcraft/gym_starcraft/envs/starcraft_env.py", line 36, in _step
self.client.send(self._make_commands(action))
File "/Users/sk/Projects/gym-starcraft/gym_starcraft/envs/single_battle_env.py", line 33, in _make_commands
if self.state is None or not action:
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
"""
It seems there is a problem with the gym environment and the starcraft, but I can't solve it.
I would appreciate it if someone could help me.

How to extract state info

In this paper the author extract the state for each unit as a tensor 72 * 72 * 16, 72*72 represent the map size, each channel in the space describes either the hit points, the damage or the safety attacking range for all the agents on the map, How can I extract this info from self.state?

Restart protocol not working

Environment:

  • BWAPI: 4.1.2
  • Torchcraft 1.0.2

I use SingleBattleEnv as my environment, and hard code env._reset() when it reach max_steps. like:

if steps >  max_steps:
    env._reset()

But, the restart protocol doesn't work! The game still running.

AttributeError: 'Box' object has no attribute 'n'

from baselines import deepq
env = sc.SingleBattleEnv(args.ip, args.port)
act = deepq.learn(
env,
q_func=model,
lr=1e-3,
max_timesteps=100000,
buffer_size=50000,
exploration_fraction=0.1,
exploration_final_eps=0.02,
print_freq=10
)
error happen.
num_actions=env.action_space.n,
AttributeError: 'Box' object has no attribute 'n'
How do I solve it?

The iteration in the SINGLE BATTLE ENV

I have questions about the 40-45 lines in single_battle_env.py.

        for uid, ut in self.state['units_myself'].iteritems():
            myself_id = uid
            myself = ut
        for uid, ut in self.state['units_enemy'].iteritems():
            enemy_id = uid
            enemy = ut

What does the iteration mean?
Does single battle env mean that it only concern one unit combats with one enemy?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.