alibaba / gym-starcraft Goto Github PK
View Code? Open in Web Editor NEWStarCraft environment for OpenAI Gym, based on Facebook's TorchCraft. (In progress)
StarCraft environment for OpenAI Gym, based on Facebook's TorchCraft. (In progress)
could you give more details about Start StarCraft server with BWAPI by Chaoslauncher?
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 ----
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.
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?
Environment:
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.
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?
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?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.