pysc2-tutorial icon indicating copy to clipboard operation
pysc2-tutorial copied to clipboard

Contributor guidelines?

Open yeungegs opened this issue 8 years ago • 6 comments

@skjb I would love to contribute to this project - I am working on tutorials for getting set up with the SC2LE and for making a basic Protoss agent. Are you open to PRs?

yeungegs avatar Oct 17 '17 20:10 yeungegs

@yeungegs If you have any code corrections, sure. Since this repo is designed for my tutorial set, it might be better for you to create your own repo that matches your style :)

skjb avatar Oct 18 '17 09:10 skjb

I am also interested in your project, is there a final smart_agent.py? i run smart_agent_step5.py and get: I1018 21:39:13.069766 7268 sc2_env.py:200] Environment is ready. I1018 21:39:13.073795 7268 sc2_env.py:240] Starting episode: 1 Took 0.691 seconds for 0 steps: 0.000 fps I1018 21:39:13.765357 7268 sc2_env.py:327] Environment Close I1018 21:39:13.766354 7268 sc2_env.py:342] Traceback (most recent call last): File "C:\Python36\lib\runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "C:\Python36\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Python36\lib\site-packages\pysc2\bin\agent.py", line 112, in app.run(main) File "C:\Python36\lib\site-packages\absl\app.py", line 272, in run _run_main(main, argv) File "C:\Python36\lib\site-packages\absl\app.py", line 237, in _run_main sys.exit(main(argv)) File "C:\Python36\lib\site-packages\pysc2\bin\agent.py", line 98, in main run_thread(agent_cls, FLAGS.map, FLAGS.render) File "C:\Python36\lib\site-packages\pysc2\bin\agent.py", line 77, in run_thread run_loop.run_loop([agent], env, FLAGS.max_agent_steps) File "C:\Python36\lib\site-packages\pysc2\env\run_loop.py", line 37, in run_loop a.reset() File "C:\Python36\lib\site-packages\pysc2\agents\base_agent.py", line 38, in reset self.episodes += 1 AttributeError: 'SmartAgent' object has no attribute 'episodes' I1018 21:39:13.791857 7268 sc2_env.py:327] Environment Close I1018 21:39:13.792357 7268 sc2_env.py:342] I1018 21:39:13.792857 7268 sc2_env.py:327] Environment Close I1018 21:39:13.793359 7268 sc2_env.py:342] W1018 21:39:16.905425 7268 sc_process.py:183] Killing the process. I1018 21:39:17.349722 7268 sc_process.py:166] Shutdown with return code: 1

ghost avatar Oct 19 '17 04:10 ghost

@agent932 I am not sure why reset() is being called, however you should be able to add this line to the top of your init() method to fix it:

super(SmartAgent, self).__init__()

skjb avatar Oct 19 '17 11:10 skjb

that worked perfect i inserted it on line 97 and it executed without error

ghost avatar Oct 19 '17 15:10 ghost

I have created a discord server @ https://discord.gg/j6DHfZm if you guys would like to chat more about this

ghost avatar Oct 20 '17 03:10 ghost

in case you're not already involved @agent932 there is a sc2ai discord server - http://sc2ai.net/ - i couldn't tell if your server invite was to the same destination since the link you included above already expired..

yeungegs avatar Nov 08 '17 22:11 yeungegs