Giter Site home page Giter Site logo

ba's Introduction

Byte Arena

arena-trainer release

GITHUB_API_TOKEN=TOKEN ./scripts/make-release-trainer.sh RELEASE

mq-cli release

./scripts/make-mq-cli.sh

ba's People

Contributors

xtuc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

dmahlow

ba's Issues

Cannot start trainer

./ba train -tps 20 -no-browser -map training-dojo -agent t --debug
  ├ version: dev (unspecified)
  └ Could not open file in archive
    ├ filename: lib/bytearenaviz.min.js
    └ zip: not a valid zip file

Bug during train

./ba train --agent baagent --agent baagent --no-browser --tps 30 --port 8080 --agent baagent --agent baagent --agent baagent
  ├ version: dev (unspecified)
  └ Assertion error
    └ Failed to unmarshal incoming JSON in CommServer::Listen()
      ├ raw: [50 44 45 53 52 51 51 46 51 55 53 57 93 125 93 125 125 10 123 34 97 103 101 110 116 105 100 34 58 34 53 97 51 53 102 100 98 102 45 100 97 51 56 45 52 51 97 53 45 97 51 51 53 45 102 49 50 97 101 99 97 50 55 102 98 53 34 44 34 109 101 116 104 111 100 34 58 34 77 117 116 97 116 105 111 110 34 44 34 112 97 121 108 111 97 100 34 58 123 34 109 117 116 97 116 105 111 110 115 34 58 91 123 34 109 101 116 104 111 100 34 58 34 115 116 101 101 114 34 44 34 97 114 103 117 109 101]
      ├ string: "2,-5433.3759]}]}}
{"agentid":"5a35fdbf-da38-43a5-a335-f12aeca27fb5","method":"Mutation","payload":{"mutations":[{"method":"steer","argume"
      └ invalid character ',' after top-level value

Invalid perception sent to agent

ba train -map labyrinth --agent sven
  ├ version: dev-2018-01-05_08:29:41
  └ Failed to send perception
    ├ agent: 0e91acc7-71f7-424f-b47a-d501c4d86471
    └ write tcp4 192.168.1.55:36085->172.17.0.2:40152: write: broken pipe

The agent unexpectedly disconnected (because it crashed, see following log)

Agent log:

[agent] [sven:latest] undefined:1
[agent] [sven:latest] {"method":"perception","payload":{"score":0,"energy":0,"velocity":[0,1.25],"azimuth":0.6159502219252506,"vision":[{"tag":"obstacle","nearedge":[13.836839917699558,2.439808205234344],"center":[7.15276183843132,24.12687101970846],"faredge":[0.4686837591630814,45.81393383418258],"velocity":[0,0]},{"tag":"obstacle","nearedge":[0,2.152650407040147],"center":[0,15.52964688272233],"faredge":[0,28.906643358404516],"velocity":[0,0]},{"tag":"obstacle","nearedge":[0,28.906643358404516],"center":[0,38.12063086119268],"faredge":[0,47.33461836398085],"velocity":[0,0]},{"tag":"obstacle","nearedge":[-4.381310039920868e-13,47.33461836308098],"center":[-4.381310039920868e-13,47.33461836308098],"faredge":[-4.381310039920868e-13,47.33461836308098],"velocity":[0,0]},{"tag":"obstacle","nearedge":[NaN,NaN],"center":[NaN,NaN],"faredge":[NaN,NaN],"velocity":[0,0]},{"tag":"obstacle","nearedge":[0,47.33461836398085],"center":[0,62.43351807102066],"faredge":[0,77.53241777806046],"velocity":[0,0]},{"tag":"obstacle","nearedg
[agent] [sven:latest]
[agent] [sven:latest] SyntaxError: Unexpected token N in JSON at position 786
[agent] [sven:latest]     at JSON.parse (<anonymous>)
[agent] [sven:latest]     at Interface.onGameServerData (/usr/app/node_modules/bytearena-sdk-comm/lib/index.js:68:24)
[agent] [sven:latest]     at emitOne (events.js:96:13)
[agent] [sven:latest]     at Interface.emit (events.js:191:7)
[agent] [sven:latest]     at Interface._onLine (readline.js:241:10)
[agent] [sven:latest]     at Interface._normalWrite (readline.js:384:12)
[agent] [sven:latest]     at Socket.ondata (readline.js:101:10)
[agent] [sven:latest]     at emitOne (events.js:96:13)
[agent] [sven:latest]     at Socket.emit (events.js:191:7)
[agent] [sven:latest]     at readableAddChunk (_stream_readable.js:178:18)

The agent logged undefined might be a hint here.

Change default ports

It would be nice to provide a CLI option to change the default ports since 8081 and 8080 are often already used.

ba.json ?

To allow for agent sharing at the git level between players, it seems required to introduce some (optional) ba.json file containing metadata and placed at the root of the agent.

Typical Metadata:

  • Authors
  • License
  • Language
  • Game Mode
  • Repo URL
  • Name
  • Description
  • Avatar URL

Would be useful also in the website, as all agent setup could be achieved (and thus versionned) in the code.

ba generate fails on mint18

ba generate nodejs
  ├ version: v0.0.9
  └ Failed to execute command
    ├ command: generate
    └ ba build failed
      └ Unknown flag: from

Agent specs: clarify maxsteeringforce meaning (doc)

The steering limit is how much the agent velocity can change from one tick to the other.
Corresponds to the max length from the tip of the current velocity vector to the tip of the new velocity vector.

=> defines maximum acceleration between ticks, whatever it's direction (forward acceleration, braking, or turning).
=> also means that, depending on the limit value, one could not turn as fast as required when at full speed.

Get rid of titlecase in communications

In the welcome method, some agent specs (Gear and sub-props) are defined on title cased props, which shlould not be the case (lowercase only is the way to go);

{
   "method":"welcome",
   "payload":{
      "maxspeed":1.25,
      "maxsteeringforce":10000,
      "maxangularvelocity":0.2617993877991494,
      "visionradius":150,
      "visionangle":2.792526803190927,
      "bodyradius":0.5,
      "maxshootenergy":1000,
      "shootrecoveryrate":10,
      "Gear":{
         "gun":{
            "Genre":"weapon",
            "Kind":"gun",
            "Specs":{
               "shootcost":200,
               "shootcooldown":3,
               "projectilespeed":15,
               "projectiledamage":400,
               "projectilerange":1200
            }
         }
      }
   }
}

Ability to scan

The issue observed in #45 is likely (to be confirmed) is that the items in the perception are not in a consistent order.

That prevents the ability the scan consistently the vision of the agent.

`ba generate nodejs`: Makefile references wrong agent name

When using ba generate nodejs, the agent name built is not the one mentionned in the Makefile.

I see 4 possibilities here:

  • leave it like that;
  • remove the Makefile
  • change the Makefile upon code generation to put in the correct name
  • use ba build in the makefile with a default of ba build to use the current directory name as a docker tag

The usage of ba isn't displayed

When running ba t --port 3 I get the following output:

Please, specify at least one agent image using --agent
Usage of ba:

Usage is not displayed.

Corrupted map file

./ba train --agent xtuc/baagent
  ├ version: dev (unspecified)
  └ Could not open archive
    ├ filename: /home/sven/.bytearena/maps/hexagon.zip
    └ zip: not a valid zip file

Even after ba map update

`ba selfupgrade`

Add a ba selfupgrade command that updates the ba command with the latest release.

Bonus points: display the changelog between the two versions.

Add a changelog

Add a changelog with every API changes between CLI versions would be really nice instead of manually looking for changes in the doc and the js sdk.

Ba build current directory doesn't work

ba build .
  ├ version: v0.0.5
  └ Failed to execute command
    ├ command: build
    └ Docker build failed
      └ Error response from daemon: invalid reference format

Probably gave an invalid directory to Docker.

Bug in install script

The line
debug "Installation completed; the command 'ba' should now be available\n"
prints a literal '\n'.

This can be fixed by changing debug from using echo $1 to echo -e $1

From the echo man page:

-e enable interpretation of backslash escapes

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.