GithubHelp home page GithubHelp logo

pong_rl's Introduction

📈 GitHub Stats

🌱 Skills

python pytorch tensorflow git c java ruby d3js mysql docker html5 css3 javascript javascript

pong_rl's People

Contributors

sosuke115 avatar thash-ai avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

pong_rl's Issues

サーバ側の仮実装を作成

ユーザーの行動を受け取り, エージェントの行動と合わせて環境に渡す.
環境から次のフレームを受け取り, ユーザーに返す.
エージェントの行動はとりあえずランダム.

iphone操作時の問題点

実際にiphoneでプレイしてみたけど色々問題あった

・ダブルタップすると拡大してしまう
・長押しするとcopy look up speakが出ちゃって邪魔
・resartボタンとrankingボタンの色がおかしい
・スクロール可能になってる
・実際の画面の大きさは色々(上側のURL表示や下側のブックマークとかのエリア)考慮すると意外と小さい

iphoneで動作が遅い・・・

@TaiseiHashimoto
今気づいたんだけど、iphoneでゲームの動作がめちゃ遅い。(FPSが低くなってる・・?)
herokuアプリの方でもそうなってる
#75 以降は(俺は)push heroku していないから#75 より前の何かが影響している・・?

DB 関連のエラー処理

現状エラー処理は全くしていない。
エラー発生時にどうするかはクライアント側も含めて考える必要あり。

FPS が環境によって異なる

スリープに requestAnimationFrame を使っているため、環境(デバイス、ブラウザなど)によって FPS が異なっている。

npm run build時のエラー

こんなエラーが急に出るようになった
原因を調査中

・とりあえずwebpackwebpack-cliをインストールし直してみたけど効果なし
・俺のnodeのversionが古いかも・・?

[webpack-cli] SyntaxError: Invalid regular expression: /(\p{Uppercase_Letter}+|\p{Lowercase_Letter}|\d)(\p{Uppercase_Letter}+)/: Invalid escape
    at pathToArgumentName (/Users/sosuke/node_modules/webpack/lib/cli.js:66:4)
    at addFlag (/Users/sosuke/node_modules/webpack/lib/cli.js:170:16)
    at traverse (/Users/sosuke/node_modules/webpack/lib/cli.js:243:21)
    at traverse (/Users/sosuke/node_modules/webpack/lib/cli.js:299:23)
    at traverse (/Users/sosuke/node_modules/webpack/lib/cli.js:248:24)
    at Object.getArguments (/Users/sosuke/node_modules/webpack/lib/cli.js:308:2)
    at WebpackCLI.getBuiltInOptions (/Users/sosuke/node_modules/webpack-cli/lib/webpack-cli.js:681:47)
    at loadCommandByName (/Users/sosuke/node_modules/webpack-cli/lib/webpack-cli.js:838:38)
    at Command.program.action (/Users/sosuke/node_modules/webpack-cli/lib/webpack-cli.js:1483:23)
    at Command.listener [as _actionHandler] (/Users/sosuke/node_modules/webpack-cli/node_modules/commander/index.js:922:31

node versionが異なるものになってた。
修正して解決

selectAction の実行が間に合っていない

ゲームをスムーズに動かすために 60 fps (~ 17 msec / step) を確保したいが、selectAction は 20 msec 以上かかることも多い。
スマートフォンではさらに時間がかかるかも。

対処法として、メインのフローと並列して selectAction を実行したい。
JavaScript は基本的にシングルスレッドのため、例えば async を使うなどの方法では並列処理ができない。(ここは自信なし)

Web Workers という機能を使うとマルチスレッドを実現できるらしいが、より簡単で JavaScript らしい解決法はあるのだろうか?

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.