12 ms·
My best is 61: Left to 26, Right to 38, Up to 54, Right to 61. Is there a JavaScript API for programatically controlling this game?
by umvi 7y ago
My best is 61: Left to 26, Right to 38, Up to 54, Right to 61.
Is there a JavaScript API for programatically controlling this game?
- nominatronic 7y ago63: Down to 5, right to 20, up to 25, right to 30, left to 38, up to 45, left to 48, up to 57, left to 63. I've also got up to 65 on similar strategies, but that's the best one I've got written down.
- NikxDa 7y agoI got 66 but I didn't track the steps. I'll try to get there again and document.
- nominatronic 7y agoDiagonal moves by alternating directions are helpful. 69: Alternate down/right to 18, up/right to 30, up to 32, right, left to 40, up to 46, left to 49, up to 55, left/up to 65, left to 69.
- nominatronic 7y ago71: same as above up to 55, then left to 60, up to 65 and right to 71.
- kepano 7y agoMy best is 91. I can get to 80+ reliably by first going to one of the edges and attracting as many red squares as possible then dragging them to the other side of the screen. Seems like a fun training ground for an evolutionary algorithm.
- jarsta 7y ago126: down 25 up 37 left 53 up 59 right 63 up 69 right 72 up 73 right 77 up 83 right 89 down 93 right 95 down 97 right 101 down 105 right 113 down 119 left 122 down 124 left 126 Maybe room for improvement in the end game, this was my fourth try?
- zokier 7y agoOP: It'd be nice if the game over screen showed the move sequence along with the score
- csallen 7y ago240: left 26, up 27, right 30, up 32, right 33, up 35, left 38, down 41, left 42, down 45, right 50, up 53, right 54, up 58, right 59, up 60, right 61, up 66, right 67, up 69, right 71, up 73, right 78, down 81, right 82, down 83, right 84, down 85, right 87, down 88, right 90, down 93, right 94, down 95, right 99, up 100, right 103, down 109, left 112, down 113, left 114, down 115, left 116, down 119, left 123, down 127, left 130, down 131, right 132, down 135, left 136, down 137, left 142, up 145, left 148, up 151, left 161, up 169, right 172, up 177, left 178, up 179, right 182, up 191, right 200, down 203, right 205, down 207, right 211, down 215, right 222, down 227, left 228, down 229, right 233, down 234, right 235, down 240
- deleted 7y ago[deleted]
- aur09 7y agoThis is impressive. I can tell that you effectively group the red squares together, but I can't figure out exactly how you went about it. What was your thought process?
- csallen 7y agoI wrote a solver that's just brute-forcing solutions. Specifically, it's doing a depth-first search through a tree where every node is a move with four child moves (left, up, right, and down). From what I can tell, the strategy is mostly what other people are doing by hand: go to one side, delay there to gather red dots for as long as possible, then move to an adjacent side. Repeat. The solver has a few tactical tricks as well, involving knowing how to get as close to red dots as possible without getting hit, and also how to move such that the dots group together. I just posted a game with a score of 346 where you can see this quite clearly. It's able to actually get in more than two full laps around.
- shhsshs 7y agoI made a JS snippet to parse/execute moves formatted like this: function parseMoves(str) { const toks = str.split(',') const moves = [] for (const tok of toks) { const [dir, num] = tok.trim().split(' ') moves.push(...new Array(num - moves.length).fill(dir)) } return moves } function toCharCode(key) { switch (key) { case 'down': return 40 case 'up': return 38 case 'right': return 39 case 'left': return 37 } } async function doMoves(str) { const moves = parseMoves(str) for (const move of moves) { await new Promise(resolve => setTimeout(resolve, 100)) myRPG.parseKeyPress({ keyCode: toCharCode(move) }) } } doMoves('left 26, up 27, right 30, up 32, right 33, up 35, left 38, down 41, left 42, down 45, right 50, up 53, right 54, up 58, right 59, up 60, right 61, up 66, right 67, up 69, right 71, up 73, right 78, down 81, right 82, down 83, right 84, down 85, right 87, down 88, right 90, down 93, right 94, down 95, right 99, up 100, right 103, down 109, left 112, down 113, left 114, down 115, left 116, down 119, left 123, down 127, left 130, down 131, right 132, down 135, left 136, down 137, left 142, up 145, left 148, up 151, left 161, up 169, right 172, up 177, left 178, up 179, right 182, up 191, right 200, down 203, right 205, down 207, right 211, down 215, right 222, down 227, left 228, down 229, right 233, down 234, right 235, down 240')