Coder Social home page Coder Social logo

challenge_jsdash's People

Contributors

feldgendler avatar

Stargazers

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

Watchers

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

challenge_jsdash's Issues

Error when running in normal mode (without --in-process)

When i run: node jsdash.js --ai=ai.js --log=log.json

{
    "cave_source": "generated",
    "seed": 662023880,
    "geometry": {
        "w": 40,
        "h": 22
    },
    "butterflies": 3,
    "ingredients": {
        " ": 25,
        ":": 50,
        "+": 10,
        "O": 10,
        "*": 5
    },
    "cave": [
        "########################################",
        "# :::::+::+::O   :::::::: : +:::  :O:::#",
        "#OO::::+: ::O+ :::: *O::  :: :*:::+:*O:#",
        "#:::: O::: O*::O    : :::::O+:O:*:: :::#",
        "#*+:O+:::+: ::OO  :: +OO*:O :+OO+ :::: #",
        "#  O::O+: :OOO:::+:+: *:O:: :+:: O   : #",
        "#: O ::::::: ::::  / ::: ::    :+:    +#",
        "#: +: : OO: :*: *::  +O: *: O :O: ::::+#",
        "#O+  *:::O :: +:::: :O:O:   ::  :::::O+#",
        "#: :: O::  **:: :::::OO::O  : :  ::: * #",
        "# OO O+::O:: :+ +::+* O: : :::OOOO::   #",
        "#: :::  : :O*: :+:::+ ::::::::* O+:::O:#",
        "# :O+  + +:O+ ::::+ : :: +OO:::::   :::#",
        "# +/    :::: :* : :::O:::::O*O O:: ::: #",
        "#::  +::  ::+ *: O:O   +:  ::::: ::*:  #",
        "# O: ::: :*::O :OO:* : *:O + *:::*O : :#",
        "#:+OO+:+ ::+:+:  OO ::: :++ : :/ O: +**#",
        "#:: :::::*::  : O::  : +:  :: :  O O:::#",
        "#::: + O+:+:  : O: :::::::::+O ::::OOOO#",
        "#:: :::   + ::OOA  :::::O: *  :  :O *O #",
        "# O: ::O   :: :::::+ ::+O :O +*O:O:: ::#",
        "########################################"
    ],
    "controller": "script",
    "script": "ai.js",
    "limit_frames": 1200,
    "limit_time": 120,
    "interval": 100,
    "fps": 10,
    "commands": "",
    "outcome": "error",
    "error": [
        "evalmachine.<anonymous>:1",
        "JSON.stringify(__hola_xyzzy__([\"########################################\",\"# :::::+::+::O   :::::::: : +:::  :O:::#\",\"#OO::::+: ::O+ :::: *O::  :: :*:::+:*O:#\",\"#:::: O::: O*::O    : :::::O+:O:*:: :::#\",\"#*+:O+:::+: ::OO  :: +OO*:O :+OO+ :::: #\",\"#  O::O+: :OOO:::+:+: *:O:: :+:: O   : #\",\"#: O ::::::: ::::  / ::: ::    :+:    +#\",\"#: +: : OO: :*: *::  +O: *: O :O: ::::+#\",\"#O+  *:::O :: +:::: :O:O:   ::  :::::O+#\",\"#: :: O::  **:: :::::OO::O  : :  ::: * #\",\"# OO O+::O:: :+ +::+* O: : :::OOOO::   #\",\"#: :::  : :O*: :+:::+ ::::::::* O+:::O:#\",\"# :O+  + +:O+ ::::+ : :: +OO:::::   :::#\",\"# +/    :::: :* : :::O:::::O*O O:: ::: #\",\"#::  +::  ::+ *: O:O   +:  ::::: ::*:  #\",\"# O: ::: :*::O :OO:* : *:O + *:::*O : :#\",\"#:+OO+:+ ::+:+:  OO ::: :++ : :/ O: +**#\",\"#:: :::::*::  : O::  : +:  :: :  O O:::#\",\"#::: + O+:+:  : O: :::::::::+O ::::OOOO#\",\"#:: :::   + ::OOA  :::::O: *  :  :O *O #\",\"# O: ::O   :: :::::+ ::+O :O +*O:O:: ::#\",\"########################################\",\"  0120  000000    ",
        "",
        "ReferenceError: __hola_xyzzy__ is not defined",
        "    at evalmachine.<anonymous>:1:16",
        "    at ContextifyScript.Script.runInContext (vm.js:53:29)",
        "    at Object.runInContext (vm.js:108:6)",
        "    at screen (...\\game\\loader.js:37:34)",
        "    at process.on.screen (...\\game\\controller.js:123:25)",
        "    at emitTwo (events.js:130:20)",
        "    at process.emit (events.js:213:7)",
        "    at handleMessage (internal/child_process.js:753:14)",
        "    at Pipe.channel.onread (internal/child_process.js:472:11)"
    ]
}

When run with --in-process all is ok.

Counter clockwise butterfly movement path

Is that correct, that counter clockwise butterfly movement path, does not use it's whole available space to move, but it spins around in area equal 4?

seed no. 76520476 - the bottom most in this example

Cannot find module random-js

The following error comes out when I try to run app

> game/jsdash.js 

module.js:487
    throw err;
    ^

Error: Cannot find module 'random-js'
    at Function.Module._resolveFilename (module.js:485:15)
    at Function.Module._load (module.js:437:25)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/home/.../challenge_jsdash/game/jsdash.js:5:19)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)

OS: Linux Fedora 25
Nodejs: v8.1.3

Killed by star is normal?

Log.json

{
    "cave_source": "generated",
    "seed": 1955062005,
    "geometry": {
        "w": 40,
        "h": 22
    },
    "butterflies": 3,
    "ingredients": {
        " ": 25,
        ":": 50,
        "+": 10,
        "O": 10,
        "*": 5
    },
    "cave": [
        "########################################",
        "#:+ O:::: :: : :OO*+   *+::O+:: :*:O:OO#",
        "# :++ :::*+ ::::+:+ ::O::::::O:   O:+::#",
        "# :O :::O :*:+:     : ::O:::: : *+:A  :#",
        "#OO:  * *:*O:  : :*: : :: ::: ::O:  :: #",
        "#: : O:::::*  :::::::: +::O:::: *:O: O:#",
        "#::: :O+:::* +::::+:::::: O :: +:  :O  #",
        "#/ : :++:: ::::*::O : ::  ::* :  O:++: #",
        "#    ::O:  +::+:*: O : :  :/ ::: :O: :O#",
        "#*:+*::O*:+::::::: *+   ::O  ::::::::*:#",
        "#OO  :::+: O:: O: +:::O ::  :: + : ::::#",
        "#:+:::O : : ::OO: ::::++:::O+OO :::: :+#",
        "#*::+O::::::::  :::O:+:O :: : ::: :+: :#",
        "#:O O  ::  O::OO::::O: +O   :+:O: :::  #",
        "# ::::::O *O::: ::++O:O::: ::O:  :O:::O#",
        "#+O+:O::   ::::: O:: * : *++: :  :: *::#",
        "#  :**O: ::O:::+::+* : *  + O::*:::O:::#",
        "#::: ::::::O::/   : ++: ::+:::: OO  :O #",
        "#: ::: :OO+ :*  ::: :::: :: O :*:OO:*  #",
        "#:OO:::::::::: :  :O :::::+::: ::::::+:#",
        "# ::::::+  O: :::: :::::: :+:* :*O*:+ :#",
        "########################################"
    ],
    "controller": "script",
    "script": "submission.js",
    "limit_frames": 1200,
    "limit_time": 120,
    "interval": 100,
    "fps": 10,
    "commands": "dldllluruu",
    "outcome": "game-over",
    "score": 2,
    "diamonds_collected": 2,
    "butterflies_killed": 0,
    "streaks": 0,
    "longest_streak": 0,
    "duration_frames": 10,
    "duration_time": 1,
    "ai_perf": {
        "processed": 10,
        "init_ms": 6,
        "total_ms": 295,
        "max_ms": 59,
        "dropped": 0,
        "avg_ms": 30
    }
}

GIF

http://om4h4iqhe.bkt.clouddn.com/2017-07-10%2000_14_30.gif

play have been call after random times

log.json

{
    "cave_source": "generated",
    "seed": 263343683,
    "geometry": {
        "w": 40,
        "h": 22
    },
    "butterflies": 3,
    "ingredients": {
        " ": 25,
        ":": 50,
        "+": 10,
        "O": 10,
        "*": 5
    },
    "cave": [
        "########################################",
        "#: + ::  * :::O* O:: :+ : +  ::O : ::: #",
        "# :: ::: ::: + :::::+ :::::::::: O  :: #",
        "# O ::O+OO+:** ::+O::+:::  O:::   :   :#",
        "# * OO O:  O::::*::+::*O:+: ::::O :::  #",
        "#O+:::O:+ :  OO/  :: ::+  :*: +::: :*: #",
        "# :+OO::::+: :   +: : ::O:*O  :: : *O::#",
        "#+ : :*:::: O::*: : +*: ::OO:+:O::: ::O#",
        "#::::++: :+:O:::::::::  :    O+  ::  :+#",
        "#* :+:: : : :/ :::   ::::::  ::*O: +:::#",
        "#::+ *+:::::O   :O::*::O O+::: :+:   +O#",
        "#:::: :::::++++: ::::  : ::::+:O::*+:: #",
        "#:OO:+:OA:  ::: :+++:  : +O: :: ::::   #",
        "#**: : :  :*+::: ::::+  ::  ::::/ :* O:#",
        "#+:: : O+ :: *+: :::+  ::*::+:*   :  ::#",
        "#:::O*:+  : *:::: : :: ::: : :   : *:: #",
        "#::+::: ::::  *: :::+::: : : :O+: :::+ #",
        "# O     :  + ::+++::   : : ::O:::+*+:::#",
        "#::: :  ::: O::O*:  :::: +: : :O:::+*:O#",
        "# OO:::::++: :O:++*:::O :+  :O  ::::O:O#",
        "# :   : +O+ *:: :**:OO::::::  :+OO:::O+#",
        "########################################"
    ],
    "controller": "script",
    "script": "submission.js",
    "limit_frames": 1200,
    "limit_time": 120,
    "interval": 100,
    "fps": 10,
    "commands": "drrrdrrddrdldllddrrrrrrruull                        ",
    "outcome": "interrupted",
    "score": 24,
    "diamonds_collected": 9,
    "butterflies_killed": 0,
    "streaks": 1,
    "longest_streak": 9,
    "duration_frames": 52,
    "duration_time": 5.2,
    "ai_perf": {
        "processed": 28,
        "init_ms": 6,
        "total_ms": 37,
        "max_ms": 6,
        "dropped": 0,
        "avg_ms": 1
    }
}

strange screen input

log.json

{
    "cave_source": "generated",
    "seed": 1432024700,
    "geometry": {
        "w": 40,
        "h": 22
    },
    "butterflies": 3,
    "ingredients": {
        " ": 25,
        ":": 50,
        "+": 10,
        "O": 10,
        "*": 5
    },
    "cave": [
        "########################################",
        "#O: : :++:: +::  :: O: :: :::: +:: :+::#",
        "# :::::O  ::::::::   :  O:::+:+::+:++O:#",
        "#:: ::+:O  O+:  :O:::+:O: ::: + ::O:* :#",
        "# ::+: :: ::+:  : O:::::: +/ O*:O+::: O#",
        "#*: +   ::+ : :  :: :+: :::  :/ ::::  :#",
        "# :OO:O:+:*   ::::+:::* : :+ :  :   : :#",
        "#:::+::O  : O+:O: ::O:O+A :  * ::O: + :#",
        "#:/ O*::+ ::::O:   +  +: :O*: +*::O  ::#",
        "#:   :O:: ::::*+O:++:*:::+O:::*:*+::: +#",
        "#O:: ::: *:::*:O: :*O:+:::::O : ::+:+::#",
        "# :  O+ O: O:+: : ::O::: : +::  O::: O #",
        "#O::+ ::* *:O:  +::O: ::  : ::O +::::::#",
        "# :+:: +: :: :+*+ ::: : + :::: :  O:: *#",
        "#*:O : :+:::::+:O :++::+  : *O:::: +O:*#",
        "#:::+O  :+::::::+::: :+:::+ :  ::::+ O #",
        "#:+: O+O:::OO:  :::: +:O:: :O::   :::  #",
        "#O OOO::::+: ::: :+ ::: :*:+: : O  :+: #",
        "#::O: :OO:::O:O+ O::: : +::::OO:+ O*:::#",
        "#   :*: O:+ :O: :: :: :  : : :+:+ +  ::#",
        "#  :: :   O:+*::O: * +O ::: ::::   ::::#",
        "########################################"
    ],
    "controller": "script",
    "script": "submission.js",
    "limit_frames": 1200,
    "commands": "ullldddrrdrrrruu       ",
    "outcome": "interrupted",
    "score": 6,
    "diamonds_collected": 3,
    "butterflies_killed": 0,
    "streaks": 1,
    "longest_streak": 3,
    "duration_frames": 23,
    "ai_perf": {
        "processed": 24,
        "init_ms": 13,
        "total_ms": 132,
        "max_ms": 77,
        "dropped": 0,
        "avg_ms": 6
    }
}

Error

Error message

TypeError: Cannot read property '27' of undefined

Screen Snapshot

{  screen:
   [ '########################################',
     '# : : :++:: +::  ::  : :: :::: +:: :+::#',
     '#O:::::O  ::::::::  O:  O:::+:+::+:++ :#',
     '#:: ::+:O  O+:  : :::+:O: ::: + ::O:* :#',
     '# ::+: :: ::+:  :OO:::::: +  O :O+::: O#',
     '# : +   ::+ : :  :: :+: :::| :  ::::  :#',
     '#*:OO:O:+:*   ::::+::     :+ :| :   : :#',
     '#:::+::O  : O+:O: ::   +  :   *::O: +O:#',
     '#:  |*::+ ::::O:   +O +: : A:*+*::O  ::#',
     '#:   :O:: ::::*+O:++:O  :+  ::*:*+::: +#',
     '# :: ::: *:::*: : :*O:+   O O : ::+:+::#',
     '# : O + O: O:+: : ::O::: :O+::   ::: O #',
     '#O::+O::* *: : O+::O: ::  : :: O+::::::#',
     '#O:+:: +: ::O:+*+ ::: : + ::::O:   ::  #',
     '#*:O : :+:::::+:O :++::+  : * ::::O+ : #',
     '#:::+   :+::::::+::: :+:::+ :O ::::+O  #',
     '#:+:  +O:::O :  :::: +: :: :O::   :::O*#',
     '#O  OO::::+:O::: :+ ::: :*:+: :    :+:*#',
     '#::O:O:  :::O:O+ O::: : +::::OO:+   :::#',
     '#  O:O: O:+ :O: :: :: :  : : :+:+O+* ::#',
     '#  ::*:OO O:+*::O: * +OO::: :::: O ::::#',
     '########################################',
     '  0119  000006  3x HOT STREAK!          ' ]}

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.