icfpc2020's People
icfpc2020's Issues
ビジュアライザネタ
-
ロード中に操作できない・分かるように...
-
途中の state からの再開 (state と vector が必要)
-
前回の state との差分
-
URL
-
途中の state の書き出し (今実はログに出してはいる)
-
サーバに出ている情報が見たい (見やすく...。send の入出力)
-
undo / redo
チュートリアル (周回しつつ shoot)
[1 1 [32 0 [512 1 64] [4 32] nil] [0 [4 32]
[[[1 1 (16 0) (0 4) [236 0 4 16] 64 64 1] nil] // 相手
[[0 0 (-16 0) (0 -4) [64 48 24 1] 0 64 1] nil]]]] // 自分
shoot
[1 1 [32 0 [512 1 64] [4 32] nil] [1 [4 32]
[[[1 1 (15 4) (-1 4) [201 0 4 16] 64 64 1] nil]
[[0 0 (-15 -4) (1 -4) [64 48 24 1] 24 64 1] [[2 (15 4) 48 39 4]]]]]]
shoot
[1 1 [32 0 [512 1 64] [4 32] nil] [2 [4 32]
[[[1 1 (13 8) (-2 4) [196 0 4 16] 64 64 1] nil]
[[0 0 (-13 -8) (2 -4) [64 48 24 1] 48 64 1] [[2 (13 8) 48 9 4]]]]]]
shoot
[1 1 [32 0 [512 1 64] [4 32] nil] [3 [4 32]
[[[1 1 (10 12) (-3 4) [127 0 4 16] 64 64 1] nil] // 遺り127
[[0 0 (-10 -12) (3 -4) [56 48 24 1] 64 64 1] [[2 (10 12) 48 73 4]]]]]] // 56 に減少
ビーム
まとめ:
- ライフが何かぜんぜんわからん
- shoot の最後の引数は GameResponse から決められそう (86, 75, 11 の数字)
[3 8412515482008592137 nil]
と START すると…
[
1
1
[4 0 [512 1 64] nil nil] // 2つ目の要素から attacker と分かる
[
0 // 0 ターン
nil
[
[[1 1 (48 0) (0 0) [423 0 0 1] 64 64 1] nil] // 相手。座標が (48,0) なのがポイント
[[0 0 (16 0) (0 0) [0 86 11 1] 0 64 1] nil]]]] // 自分 (role = 0)。ここの 86 がポイント。
となる。相手の** (?) にビームを打つと。
[4 8412515482008592137 [[2 0 (48 0) 86]]]
shoot command は (2, shipId, target, x3)
である。相手の座標に 86 という数字を指定して shoot
この結果は
[1
1
[4 0 [512 1 64] nil nil]
[1 // 1ターン
nil
[[[1 1 (48 0) (0 0) [196 0 0 1] 64 64 1] nil] // 相手 423 → 196 と 227 減少
[[0 0 (16 0) (0 0) [0 75 11 1] 64 64 1] [[2 (48 0) 86 227 4]]]]]] // 自分。86 だったものが 75 に……。
次にもう1回相手の**にビーム
[4 8412515482008592137 [[2 0 (48 0) 75]]]
繰り返すが shoot command は (2, shipId, target, x3)
である。相手の座標に 75 という数字を指定して shoot。
結果は...
[1 1 [4 0 [512 1 64] nil nil]
[2 nil
[[[1 1 (48 0) (0 0) [2 0 0 1] 64 64 1] nil] // 相手。196 だった数字が 2 に……。
[[0 0 (16 0) (0 0) [0 11 11 1] 64 64 1] [[2 (48 0) 75 194 4]]]]]] // [0 75 11 1] → [0 11 11 1]
またビーム
[4 8412515482008592137 [[2 0 (48 0) 11]]]
11 になった……。
結果は
[1 1 [4 0 [512 1 64] nil nil]
[3 nil
[[[1 1 (48 0) (0 0) [0 0 0 1] 64 64 1] nil] // 相手。[0 0 0 1] に。しかし UI 上 (?) 死んではない。
[[0 0 (16 0) (0 0) [0 11 11 1] 64 64 1] [[2 (48 0) 11 2 4]]]]]] // [0 11 11 1] のまま。
またビーム。内容は今度は同じ
[4 8412515482008592137 [[2 0 (48 1) 11]]] // 11 のまま!
[1 2 // 2 になった!
[4 0 [512 1 64] nil nil]
[4
nil
[[[1 1 (48 0) (0 0) [0 0 0 1] 64 64 1] nil] // 相手。[0 0 0 1] のまま。
[[0 0 (16 0) (0 0) [0 11 11 1] 64 64 1] [[2 (48 1) 11 0 4]]]]]] // [0 11 11 1] のまま。
で、ゲーム終了。
1回 shoot したあとに NOP すると
[1 1 [4 0 [512 1 64] nil nil] [2 nil [[[1 1 (48 0) (0 0) [196 0 0 1] 64 64 1] nil] [[0 0 (16 0) (0 0) [0 75 11 1] 53 64 1] nil]]]]
となって……。
- [0 75 11 1] は一緒
- 53 という数字がかわっとる
ビームずらす (初手。x が -1)
[4 4226394960682055569 [[2 0 (47 0) 86]]]
座標だけ違う。86 はそのまま。GameResponse 内の ships の自分を見つけて……。
結果は
[1 1 [4 0 [512 1 64] nil nil]
[1 nil
[[[1 1 (48 0) (0 0) [366 0 0 1] 64 64 1] nil] // 366 になっている???
[[0 0 (16 0) (0 0) [0 75 11 1] 64 64 1] [[2 (47 0) 86 228 4]]]]]] // 86 228 4 と appliedCommands に 228 が入る。何。直撃は 227 でした。
ビジュアライズめも
tutoril:
- めも:
- 一杯でてるやつの右下は残り時間
- 2P モード にいけない
- 明示的に残り時間を0にすると何か分からない?
- わかってない
- JOIN の引数
(2, playerKey, (...unknown list...))
- START は
(3, playerKey, (x0, x1, x2, x3))
で 4 つ謎。多分過去試合に出てくるやつ? - shoot command の
(2, shipId, target, x3)
- JOIN の引数
respones = (1, gameStage, staticGameInfo, gameState)
staticGameInfo = (x0, role, x2, x3, x4)
gameState = (gameTick, x1, shipsAndCommands)
ship = (role, shipId, position, velocity, x4, x5, x6, x7)
- staticGameInfo, ship, gameState とか見つけたい → 常に固定。state に変わってない箇所があるとチャンス?
[1 0 [256 1 [448 1 64] [16 128] nil] nil]
- static game info の ...
- 1つ目 → 256 が入っている
- 3つ目 → 3要素リスト
- 4つ目 → 2要素
- 5つ目 → [1 ...] だったり [] だったり
- static game info の ...
ボム
全てを破壊したい (ポエム)。入り口
JOIN 調べる
(2, playerKey, (...unknown list...))
空リストの場合:
[2020-07-20T08:41:57Z INFO ships] GameResponse from START (Role: Attacker):
GameResponse { stage: Started, static_game_info: StaticGameInfo { maybe_field_size: 384, role: Attacker }, game_state: Some(GameState { game_tick: 0, ships_and_commands:[
ShipAndAppliedCommands { ship: Ship { role: Defender, ship_id: 0, position: Vector { x: -48, y: -41 },
velocity: Vector { x: 0, y: 0 }, x4: (232, 0, 8, 20), x5: 0, x6: 64, x7: 1 } },
ShipAndAppliedCommands { ship: Ship { role: Attacker, ship_id: 1, position: Vector { x: 48, y: 41 },
velocity: Vector { x: 0, y: 0 }, x4: (86, 58, 16, 1), x5: 0, x6: 64, x7: 1 } }] }) }
[2020-07-20T08:41:57Z INFO ships] GameResponse from START (Role: Defender):
GameResponse { stage: Started, static_game_info: StaticGameInfo { maybe_field_size: 384, role: Defender }, game_state: Some(GameState { game_tick: 0, ships_and_commands: [
ShipAndAppliedCommands { ship: Ship { role: Defender, ship_id: 0, position: Vector { x: -48, y: -41 },
velocity: Vector { x: 0, y: 0 }, x4: (232, 0, 8, 20), x5: 0, x6: 64, x7: 1 } },
ShipAndAppliedCommands { ship: Ship { role: Attacker, ship_id: 1, position: Vector { x: 48, y: 41 },
velocity: Vector { x: 0, y: 0 }, x4: (86, 58, 16, 1), x5: 0, x6: 64, x7: 1 } }] }) }
(1, 1, 1, 1)
を入れてみる (Attacker)
[2020-07-20T08:45:13Z INFO ships] GameResponse from START (Role: Attacker): GameResponse { stage: Started, static_game_info: StaticGameInfo { maybe_field_size: 384, role: Attacker }, game_state: Some(GameState { game_tick: 0, ships_and_commands: [
ShipAndAppliedCommands { ship: Ship { role: Defender, ship_id: 0, position: Vector { x: -45, y: 48 },
velocity: Vector { x: 0, y: 0 }, x4: (232, 0, 8, 20), x5: 0, x6: 64, x7: 1 } },
ShipAndAppliedCommands { ship: Ship { role: Attacker, ship_id: 1, position: Vector { x: 45, y: -48 },
velocity: Vector { x: 0, y: 0 }, x4: (86, 58, 16, 1), x5: 0, x6: 64, x7: 1 } }] }) }
[2020-07-20T08:45:13Z INFO ships] GameResponse from START (Role: Defender): GameResponse { stage: Started, static_game_info: StaticGameInfo { maybe_field_size: 384, role: Defender }, game_state: Some(GameState { game_tick: 0, ships_and_commands: [
ShipAndAppliedCommands { ship: Ship { role: Defender, ship_id: 0, position: Vector { x: -45, y: 48 },
velocity: Vector { x: 0, y: 0 }, x4: (232, 0, 8, 20), x5: 0, x6: 64, x7: 1 } },
ShipAndAppliedCommands { ship: Ship { role: Attacker, ship_id: 1, position: Vector { x: 45, y: -48 },
velocity: Vector { x: 0, y: 0 }, x4: (86, 58, 16, 1), x5: 0, x6: 64, x7: 1 } }] }) }
のこり
- AI
- 分裂
- ディフェンダーは端に逃げる
- アタッカーは的に近付く (リスク?)
- ビームが弱い原因を調査
- デグレ防止
- サブミットしたときに 256 ターン生きる……ハズ (今は!)
- チュートリアル……やる?
- ビーム解析
2P mode
qwerty@Prokyon:/mnt/c/Users/qwerty/Documents/GitHub/icfpc2020$ echo "11011000011101000" | ./scripts/decode
[1 0]
qwerty@Prokyon:/mnt/c/Users/qwerty/Documents/GitHub/icfpc2020$ echo "11011000011111110101101111111111111111100110001000111100111001101111000100001011110000110001100010001000001111011000011101111111111111111100001101000011101110100101101111000001101101001101110001110111000000000" | ./scripts/decode
[1 [[0 7078786637278419080] [1 1881892070464349112]]]
qwerty@Prokyon:/mnt/c/Users/qwerty/Documents/GitHub/icfpc2020$ echo "1101000" |
./scripts/decode
[0]
qwerty@Prokyon:/mnt/c/Users/qwerty/Documents/GitHub/icfpc2020$ echo "1101100001110111110000110110000010000" | ./scripts/decode
[1 6916]
qwerty@Prokyon:/mnt/c/Users/qwerty/Documents/GitHub/icfpc2020$ echo "1101100101110111111111111111110000110100001110111010010110111100000110110100110111000111011100000" | ./scripts/decode
[5 1881892070464349112]
qwerty@Prokyon:/mnt/c/Users/qwerty/Documents/GitHub/icfpc2020$ echo "11011000011101011010111010000111111101100001110101101000111101011010110100000110000" | ./scripts/decode
[1 0 0 -1 [[1 0 0] [0 0 0]] nil]
qwerty@Prokyon:/mnt/c/Users/qwerty/Documents/GitHub/icfpc2020$ echo "11011000101101111111111111111100001101000011101110100101101111000001101101001101110001110111000110000" | ./scripts/decode
[2 1881892070464349112 nil]
qwerty@Prokyon:/mnt/c/Users/qwerty/Documents/GitHub/icfpc2020$ echo "1101100001110101111011110000100000000110110000111110111100001110000001101100001110111001000000001111011100001000011011101000000000110000110000" | ./scripts/decode
[1 0 [256 1 [448 1 64] [16 128] nil] nil]
qwerty@Prokyon:/mnt/c/Users/qwerty/Documents/GitHub/icfpc2020$
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.