Giter Site home page Giter Site logo

minigame_hit_and_run's People

Contributors

heerdemoglu avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

soygema

minigame_hit_and_run's Issues

Running random agent from console -- Unable to connect to web-socket

Ey!
I am testing the HitAndRun mini-game in order to add it to the community curated list I am doing. There is not problem in the test coming from the editor. However, when running it from the console with the pySC2 random agent, it raises a connection error .

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/websocket/_socket.py", line 80, in recv
    bytes_ = sock.recv(bufsize)
socket.timeout: timed out

During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/local/lib/python3.6/site-packages/pysc2/bin/agent.py", line 112, in <module>
    app.run(main)
  File "/usr/local/lib/python3.6/site-packages/absl/app.py", line 272, in run
    _run_main(main, argv)
  File "/usr/local/lib/python3.6/site-packages/absl/app.py", line 237, in _run_main
    sys.exit(main(argv))
  File "/usr/local/lib/python3.6/site-packages/pysc2/bin/agent.py", line 98, in main
    run_thread(agent_cls, FLAGS.map, FLAGS.render)
  File "/usr/local/lib/python3.6/site-packages/pysc2/bin/agent.py", line 74, in run_thread
    visualize=visualize) as env:
  File "/usr/local/lib/python3.6/site-packages/pysc2/env/sc2_env.py", line 132, in __init__
    self._setup((agent_race, bot_race, difficulty), **kwargs)
  File "/usr/local/lib/python3.6/site-packages/pysc2/env/sc2_env.py", line 185, in _setup
    self._launch(interface, player_setup)
  File "/usr/local/lib/python3.6/site-packages/pysc2/env/sc2_env.py", line 218, in _launch
    self._controllers[0].join_game(join)
  File "/usr/local/lib/python3.6/site-packages/pysc2/lib/remote_controller.py", line 80, in _valid_status
    return func(self, *args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/pysc2/lib/remote_controller.py", line 55, in _check_error
    return check_error(func(*args, **kwargs), error_enum)
  File "/usr/local/lib/python3.6/site-packages/pysc2/lib/stopwatch.py", line 197, in _stopwatch
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/pysc2/lib/remote_controller.py", line 120, in join_game
    return self._client.send(join_game=req_join_game)
  File "/usr/local/lib/python3.6/site-packages/pysc2/lib/protocol.py", line 127, in send
    res = self.send_req(sc_pb.Request(**kwargs))
  File "/usr/local/lib/python3.6/site-packages/pysc2/lib/protocol.py", line 113, in send_req
    return self.read()
  File "/usr/local/lib/python3.6/site-packages/pysc2/lib/stopwatch.py", line 197, in _stopwatch
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/pysc2/lib/protocol.py", line 86, in read
    response = self._read()
  File "/usr/local/lib/python3.6/site-packages/pysc2/lib/protocol.py", line 152, in _read
    response_str = self._sock.recv()
  File "/usr/local/lib/python3.6/site-packages/websocket/_core.py", line 293, in recv
    opcode, data = self.recv_data()
  File "/usr/local/lib/python3.6/site-packages/websocket/_core.py", line 310, in recv_data
    opcode, frame = self.recv_data_frame(control_frame)
  File "/usr/local/lib/python3.6/site-packages/websocket/_core.py", line 323, in recv_data_frame
    frame = self.recv_frame()
  File "/usr/local/lib/python3.6/site-packages/websocket/_core.py", line 357, in recv_frame
    return self.frame_buffer.recv_frame()
  File "/usr/local/lib/python3.6/site-packages/websocket/_abnf.py", line 340, in recv_frame
    self.recv_header()
  File "/usr/local/lib/python3.6/site-packages/websocket/_abnf.py", line 288, in recv_header
    header = self.recv_strict(2)
  File "/usr/local/lib/python3.6/site-packages/websocket/_abnf.py", line 375, in recv_strict
    bytes_ = self.recv(min(16384, shortage))
  File "/usr/local/lib/python3.6/site-packages/websocket/_core.py", line 427, in _recv
    return recv(self.sock, bufsize)
  File "/usr/local/lib/python3.6/site-packages/websocket/_socket.py", line 83, in recv
    raise WebSocketTimeoutException(message)`

It also have an error in the visual script ScoreUpdatesVictory in CreateUnitsWithDefaultFacing.
I will work on the debugging, please let me know if you solve it somehow

thanks!

Developing Agents for the Mini-game

Scripted and RL based agents should be written for the minigame. Current RL methods include Q-Learning, Temporal Difference Learning, and Multi-Armed Bandit problems.

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.