battlecode / bc18-scaffold Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
$ ./run_nodocker.sh
=== STARTING THE MANAGER (no docker) ===
=== ensuring dependencies ===
$ python3 /data/works/coding_challenges/battlecode-2018/resources/bc18-scaffold/battlecode-manager/gui.py
Traceback (most recent call last):
File "/data/works/coding_challenges/battlecode-2018/resources/bc18-scaffold/battlecode-manager/gui.py", line 3, in <module>
import battlecode_cli as cli
File "/data/works/coding_challenges/battlecode-2018/resources/bc18-scaffold/battlecode-manager/battlecode_cli.py", line 13, in <module>
import server
File "/data/works/coding_challenges/battlecode-2018/resources/bc18-scaffold/battlecode-manager/server.py", line 18, in <module>
import battlecode as bc
File "/data/works/coding_challenges/battlecode-2018/resources/bc18-scaffold/battlecode/python/battlecode/__init__.py", line 11, in <module>
from .linux._bc import ffi as _ffi
ModuleNotFoundError: No module named 'battlecode.linux._bc'
I think __init__.py
expects to found _bc.py
but the linux
directory is empty
$ tree battlecode/python/battlecode/
battlecode/python/battlecode/
├── darwin
│ └── _bc.abi3.so
├── docs.txt
├── __init__.py
├── linux
├── __pycache__
│ └── __init__.cpython-36.pyc
└── win32
└── _bc.pyd
4 directories, 5 files
The same error happened when running battlecode.sh
too.
The bananas.bc18t map includes 8 initial workers on each team. However, the Python documentation states "Each team starts with 1 to 3 Workers on Earth."
In the first version of bc18-scaffold I was able to run my Players without errors, but in the recent versions I get the following errors when I try to execcute any (java) robot
with run_nodocker.sh:
[earth:blue] javac ./Extra.java ./Player.java -classpath ../battlecode/java
[earth:blue] ../battlecode/java/bc/bcJNI.java:254: error: cannot find symbol
[earth:blue] public final static native String ReceivedMessaTurnMessage_toJson(long jarg1, ReceivedMessaTurnMessage jarg1_);
[earth:blue] ^
[earth:blue] symbol: class ReceivedMessaTurnMessage
[earth:blue] location: class bcJNI
[earth:blue] ../battlecode/java/bc/bcJNI.java:255: error: cannot find symbol
[earth:blue] public final static native String ReceivedMessaTurnMessage_toString(long jarg1, ReceivedMessaTurnMessage jarg1_);
[earth:blue] ^
[earth:blue] symbol: class ReceivedMessaTurnMessage
[earth:blue] location: class bcJNI
[earth:blue] ../battlecode/java/bc/bcJNI.java:259: error: cannot find symbol
[earth:blue] public final static native String SentMessage_toJson(long jarg1, SentMessage jarg1_);
[earth:blue] ^
[earth:blue] symbol: class SentMessage
[earth:blue] location: class bcJNI
[earth:blue] ../battlecode/java/bc/bcJNI.java:260: error: cannot find symbol
[earth:blue] public final static native String SentMessage_toString(long jarg1, SentMessage jarg1_);
[earth:blue] ^
[earth:blue] symbol: class SentMessage
[earth:blue] location: class bcJNI
[earth:blue] ../battlecode/java/bc/bcJNI.java:261: error: cannot find symbol
[earth:blue] public final static native void SentMessage_client_id_set(long jarg1, SentMessage jarg1_, String jarg2);
[earth:blue] ^
[earth:blue] symbol: class SentMessage
[earth:blue] location: class bcJNI
[earth:blue] ../battlecode/java/bc/bcJNI.java:262: error: cannot find symbol
[earth:blue] public final static native String SentMessage_client_id_get(long jarg1, SentMessage jarg1_);
[earth:blue] ^
[earth:blue] symbol: class SentMessage
[earth:blue] location: class bcJNI
[earth:blue] ../battlecode/java/bc/bcJNI.java:263: error: cannot find symbol
[earth:blue] public final static native void SentMessage_turn_message_set(long jarg1, SentMessage jarg1_, long jarg2, TurnMessage jarg2_);
[earth:blue] ^
[earth:blue] symbol: class SentMessage
[earth:blue] location: class bcJNI
[earth:blue] ../battlecode/java/bc/bcJNI.java:264: error: cannot find symbol
[earth:blue] public final static native long SentMessage_turn_message_get(long jarg1, SentMessage jarg1_);
[earth:blue] ^
[earth:blue] symbol: class SentMessage
[earth:blue] location: class bcJNI
[earth:blue] 8 errors
with run.sh the javac cannot find the bc package:
running game
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/bottle.py", line 862, in _handle
return route.call(**args)
File "/usr/lib/python3.6/site-packages/bottle.py", line 1740, in wrapper
rv = callback(*a, **ka)
File "/usr/lib/python3.6/site-packages/bottle_websocket/plugin.py", line 5, in wrapper
callback(request.environ.get('wsgi.websocket'), *args, **kwargs)
File "/usr/lib/python3.6/site-packages/eel/__init__.py", line 115, in _websocket
return_val = _exposed_functions[message['name']](*message['args'])
TypeError: get_viewer_data() takes 0 positional arguments but 1 was given
[earth:blue] javac ./Extra.java ./Player.java -classpath ../battlecode/java
[earth:blue] ./Extra.java:1: error: package bc does not exist
[earth:blue] import bc.*;
[earth:blue] ^
[earth:blue] ./Player.java:3: error: package bc does not exist
[earth:blue] import bc.*;
[earth:blue] ^
[earth:blue] ./Player.java:12: error: cannot find symbol
[earth:blue] MapLocation loc = new MapLocation(Planet.Earth, 10, 20);
[earth:blue] ^
[earth:blue] symbol: class MapLocation
[earth:blue] location: class Player
(the error continues for every call on bc package)
if I acess http://localhost:6147/run.html sometimes the match does not start (and no outputs appears on terminal), so I acess 0.0.0.0:6147/run.html
hello, I believe the file libbattlecode-java-win32.dll
is missing from the battlecode/java/bc
folder. I'm not sure if this is intentional, but it wont be possible to run battlecode on windows without it. Is this planned on being fixed?
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.