Lunar Ball / Lunar Pool. It is a minigolf-esque pocket billiards game.
Emulator used: FCEU version 0.98.15. The last table will not sync on any other version.
Table of contents

Game objectives

  • Emulator used: FCEU version 0.98.15
  • Complete all 60 boards starting from 1
    • It is possible to begin from any board, including 60, but you have to complete all 60 to get the ending
  • Single player
  • Friction setting: 32 (DEFAULT)
  • Fastest time
  • Does not use death (it was used in the frictionless version).
  • Utilizes glitches

N/A game objectives

  • This game is completely deterministic. There is no "manipulates luck".
  • Apologies, but there are still no dinosaurs in this game.

Comments

This movie was created mostly using a computer program, the development of which took several months and several iterations.
This movie plays using the default settings of the game. That is, it starts from the first board and uses the default friction setting. Given the arbitrary selection possibility for friction, the default value gives a reasonable baseline for comparisons to other players' results.
The development of this movie began in late 2006, after Comicalflop suggested the possibility of writing a computer program to calculate the optimal shots. I started writing my bot as a sort of competition between qFox and I.
As a programming challenge, it was very interesting, because of the infinite possibilities for improvements.
The source code of my first version of the bot can be seen here. It determined the most optimal shot, then moved on, repeated ad-infinitum. However, it was quickly seen that such a naive bot has its shortcomings. This game has a RATE mechanism that causes the board clearing to take longer and longer time until it is practically impractical. By board 27, the bot had already consumed 29 minutes in the movie.
It was determined that any bot would have to start shooting "dummy" shots in the between; shots that would pocket no balls at all, but which would simply reset the RATE value.
This was relatively easy to program, but not a trivial change to make: Instead of 80*256 shots (20480) to determine, there would be 80*256 + 80*256*80*256 shots (419450880) to determine, per each round. It was obvious that something would have to be done for the movie to be finished within a decade.
So I designed lots and lots of heuristics by which the attempts could be cancelled as early as possible. Wrote code which attempts to save frames (in testing) by reusing cursor positions and choosing the velocity values in the order that they become available. And I added multiprocessing, which analyzes four different ways of shooting simultaneously using the quad-core CPU.
Even this was not enough, so I had to limit the search space somewhat so that only some second-shots would be analyzed. The second-shots to be analyzed would have a velocity and angle range much smaller than for the first-shots. This would reduce the search space from 419450880 shots into 80*256 + 41*256*29*112 (34111488). This reduced number is only 8 % of the original number. Even with this reduced number, it took about 3 days per average for the bot to do a single round; about a week by average to clear a single board. This movie does not utilize the "suicide" option that was used in the frictionless submission.
However, much to everyone's surprise, the bot managed to find a bug in the game. You can see it in this movie in a few boards, described below.

Score and RATE


In Lunar Ball, each successful shot increases the "RATE" value of the player; each unsuccessful shot resets it. The higher the "RATE" value, the more points the player is awarded for the next successful shot. Points are awarded at a rate of 10 points per frame.
The RATE value maxes at 99, at which point completing a single board can give about 12000 points IIRC. Tallying that amount takes about 20 seconds. Because nobody wants to watch 15 minutes of score tallying, it is a good idea to reset the RATE value every once in a while.
In this movie, the RATE value is reset by shooting shots that do not pocket any balls. Such shots achieve to reset the RATE value, as well as to move the balls into a more optimal position for the actual shot that pockets them.

Board by board comments

Stage 01, Standard board

Shot 1RATE=01Positioning only. Push balls 1, 3 and 5. The bot determined that it can do a much better shot after this shot.
Shot 2RATE=01Pocket balls 1, 2, 4 and 6. Score += 410, (1*1 + 2*2 + 4*3 + 6*4)*10
Shot 3RATE=11Positioning only. Touch ball 3.
Shot 4RATE=01Pocket balls 3, 5. Score += 130, (3*1 + 5*2)*10

Stage 02, Corner oriented

Shot 1RATE=05Positioning only.
Shot 2RATE=01Pocket balls 1, 2, 4 and 5. Partially uses ball 6 as a projectile.
Shot 3RATE=11Positioning only.
Shot 4RATE=01Pocket balls 3 and 6.

Stage 03, Four corner compartments

Shot 1RATE=05Pocket balls 1, 2 and 4. Score += 450, (1*5 + 2*6 + 4*7)*10
Shot 2RATE=12Positioning only.
Shot 3RATE=01Pocket balls 3, 5 and 6.

Stage 04, Clamp the middle

Shot 1RATE=08Pocket balls 1 and 2. Use ball 2 as a projectile. Score += 260, (1*8 + 2*9)*10
Shot 2RATE=12Positioning only. Touch ball 7.
Shot 3RATE=01Pocket balls 4, 5 and 6.
Shot 4RATE=08Pocket balls 3 and 7. Score += 870, (3*8 + 7*9)*10

Stage 05, Z shape with horizontal ball orientation

Shot 1RATE=12Positioning only.
Shot 2RATE=01Pocket balls 1, 2 and 3.
Shot 3RATE=08Positioning only.
Shot 4RATE=01Pocket balls 4, 5, 6 and 7. Score += 600, (4*1 + 5*2 + 6*3 + 7*4)*10

Stage 06, Octagon with many adjacent pockets

Shot 1RATE=11Positioning only.
Shot 2RATE=01Pocket balls 1, 2 and 5, using ball 1 as a projectile.
Shot 3RATE=08Positioning only.
Shot 4RATE=01Pocket balls 3, 4 and 6.

Stage 07, North diagonals

Shot 1RATE=08Positioning only.
Shot 2RATE=01Pocket balls 1, 2, 4, 5 and 7. Score += 860, (1*1 + 2*2 + 4*3 + 5*4 + 7*7)*10
Shot 3RATE=14Pocket ball 6 without hesitation. Score += 840, (6*14)*10
Shot 4RATE=15Pocket ball 3 without hesitation. Score += 450, (3*15)*10

Stage 08, Plus sign with eight pockets

Shot 1RATE=16Positioning only.
Shot 2RATE=01Pocket balls 3, 4, 5 and 7.
Shot 3RATE=11Positioning only. Some cursor movement detected.
Shot 4RATE=01Pocket balls 1, 2 and 6. Some cursor movement detected.

Stage 09, Circular with wall in the middle

Shot 1RATE=11Positioning only. Some cursor movement detected.
Shot 2RATE=01Pocket balls 1, 2 and 3. Some cursor movement detected.
Shot 3RATE=08Positioning only. Push ball 4.
Shot 4RATE=01Pocket balls 4, 5 and 6.

Stage 10, Superposition of two stage 02s

Shot 1RATE=08Positioning only. Push ball 3.
Shot 2RATE=01Pocket balls 1, 2, 3 and 4.
Shot 3RATE=11Pocket balls 5 and 6 without hesitation. Score += 1270, (5*11 + 6*12)*10.

Stage 11, X shape with sixteen pockets

Shot 1RATE=15Positioning only. Push ball 6.
Shot 2RATE=01Pocket balls 1, 2, 3, 4 and 6.
Shot 3RATE=14Positioning only.
Shot 4RATE=01Pocket ball 5. Score += 50.

Stage 12, Circular with a giant pocket in the middle

Shot 1RATE=02Positioning only.
Shot 2RATE=01Pocket balls 1, 2, 3 and 5.
Shot 3RATE=11Positioning only.
Shot 4RATE=01Pocket balls 4, 6 and 7.

Stage 13, Greater-than sign

Shot 1RATE=08Positioning only. Push ball 7.
Shot 2RATE=01Pocket balls 1, 5, 6 and 7.
Shot 3RATE=11Positioning only. Some cursor movement detected.
Shot 4RATE=01Pocket balls 2, 3 and 4. Some cursor movement detected.

Stage 14, Diagonal oval

Shot 1RATE=08Positioning only.
Shot 2RATE=01Pocket balls 2, 3 and 6.
Shot 3RATE=08Pocket balls 4 and 6 without hesitation. Push ball 7.
Shot 4RATE=12Pocket ball 1 without hesitation.
Shot 5RATE=13Pocket ball 7 without hesitation. Score += 910, (7*13)*10.

Stage 15, Choice of five

Shot 1RATE=14Positioning only. Push ball 2.
Shot 2RATE=01Pocket balls 1, 2, 3 and 4.
Shot 3RATE=11Pocket ball 5. Some cursor movement detected.

Stage 16, Walled halves

Shot 1RATE=12Positioning only.
Shot 2RATE=01Pocket balls 1, 2 and 3.
Shot 3RATE=08Positioning only.
Shot 4RATE=01Pocket balls 4, 5 and 6.

Stage 17, Little teeth here and there

Shot 1RATE=08Positioning only. Some cursor movement detected. Ball 1 used as a projectile.
Shot 2RATE=01Pocket balls 1, 2 and 3.
Shot 3RATE=08Positioning only. Some cursor movement detected.
Shot 4RATE=01Pocket balls 4 and 5. Some cursor movement detected.

Stage 18, Z shape revisited

Shot 1RATE=05Positioning only.
Shot 2RATE=01Pocket balls 1, 2, 3 and 6.
Shot 3RATE=11Positioning only.
Shot 4RATE=01Pocket balls 4, 5 and 7.

Stage 19, Reminds me of the union jack

Shot 1RATE=08Positioning only.
Shot 2RATE=01Pocket balls 2, 4, 5 and 6. Ball 2 used as a projectile.
Shot 3RATE=11Pocket ball 3 without hesitation.
Shot 4RATE=12Pocket ball 2. Score += 240, (2*12)*10.

Stage 20, Obstacle course

Shot 1RATE=13Positioning only. Push ball 3.
Shot 2RATE=01Pocket balls 1, 2, 3, 4, 5 and 6. Score += 910, (1*1+2*2+3*3+4*4+5*5+6*6)*10.

Stage 21, Walls and corridors

Shot 1RATE=17Positioning only. Push ball 3.
Shot 2RATE=01Pocket balls 1, 3, 4, 6 and 7. Ball 2 used as a projectile.
Shot 3RATE=14Pocket balls 2 and 5. Score += 1030, (2*14 + 5*15)*10.

Stage 22, Walls point towards a drain

Shot 1RATE=18Positioning only.
Shot 2RATE=01Pocket balls 1, 5 and 6.
Shot 3RATE=08Pocket balls 2, 3, 4 and 7.

Stage 23, Forward slash

Shot 1RATE=19Positioning only.
Shot 2RATE=01Pocket balls 3, 4 and 5.
Shot 3RATE=08Positioning only. Push ball 2.
Shot 4RATE=01Pocket balls 2, 6 and 7. Ball 6 used as a projectile.
Shot 5RATE=08Pocket ball 1 without hesitation.

Stage 24, North diagonals revisited

Shot 1RATE=09Positioning only. Push ball 1.
Shot 2RATE=01Pocket balls 1, 2, 3 and 5.
Shot 3RATE=11Positioning only.
Shot 4RATE=01Pocket balls 4, 6 and 7.

Stage 25, Circular with wall in the middle revisited

Shot 1RATE=08Positioning only.
Shot 2RATE=01Pocket balls 1, 2, 4 and 5.
Shot 3RATE=11Positioning only.
Shot 4RATE=01Pocket balls 3 and 6.

Stage 26, Left-pointing arrow

Shot 1RATE=05Positioning only. Push ball 1.
Shot 2RATE=01Pocket balls 4, 6 and 7.
Shot 3RATE=08Positioning only.
Shot 4RATE=01Pocket balls 2, 3 and 5.
Shot 5RATE=08Pocket ball 1 without hesitation.

Stage 27, Plus sign with eight pockets revisited

Shot 1RATE=09Positioning only. Push ball 1.
Shot 2RATE=01Pocket balls 1, 2 and 7, using ball 1 as the projectile.
Shot 3RATE=08Positioning only. Push ball 4. Some cursor movement detected.
Shot 4RATE=01Pocket balls 3, 4, 5 and 6. Some cursor movement detected.

Stage 28, As board 01, but with shark tooth edges

Shot 1RATE=11Positioning only.
Shot 2RATE=01Pocket balls 1, 2, 3 and 6.
Shot 3RATE=11Positioning only.
Shot 4RATE=01Pocket balls 4 and 5.

Stage 29, Obstacle course revisited

Shot 1RATE=05Pocket ball 7. PERFECT!
This is the only "PERFECT!" in this movie.

Stage 30, Diagonal compartments

Shot 1RATE=09Pocket balls 1 and 2. Push ball 3.
Shot 2RATE=13Pocket ball 3 without hesitation. Score += 3*13*10.
Shot 3RATE=14Positioning only.
Shot 4RATE=01Pocket balls 4, 5 and 6.

Stage 31, Walled halves revisited

Shot 1RATE=08Positioning only.
Shot 2RATE=01Pocket balls 1, 5 and 6.
Shot 3RATE=08Pocket balls 2 and 3.
Shot 4RATE=12Pocket ball 7 without hesitation.
Shot 5RATE=13Positioning only.
Shot 6RATE=01Pocket ball 4. Maximum velocity.

Stage 32, LB

Shot 1RATE=02Pocket balls 1, 2, 3 and 6.
Shot 2RATE=01Positioning only.
Shot 3RATE=01Pocket balls 4, 5 and 7.

Stage 33, Ziggurat

Shot 1RATE=08Positioning only
Shot 2RATE=01Pocket balls 1 and 4. Using a maneuver that makes perfectly sense but is not likely to succeed.
Shot 3RATE=05Pocket ball 6 without hesitation.
Shot 4RATE=06Positioning only
Shot 5RATE=01Pocket balls 2, 3 and 5.

Stage 34, Diagonal oval revisited

Shot 1RATE=08Pocket balls 1 and 2. Maximum velocity.
Shot 2RATE=12Positioning only.
Shot 3RATE=01Pocket balls 3, 4 and 5.
Shot 4RATE=08Positioning only.
Shot 5RATE=01Pocket balls 6 and 7.
Ball 2 was pocketed before ball 1.

Stage 35, Circular with a giant pocket in the middle revisited

Shot 1RATE=05Positioning only. Push balls 1 and 3.
Shot 2RATE=01Pocket balls 1, 2, 3, 5, 6 and 7.
Shot 3RATE=17Pocket ball 4.

Stage 36, Horizontal walls

Shot 1RATE=18Positioning only. Push ball 6.
Shot 2RATE=01Pocket balls 2, 4, 5 and 7.
Shot 3RATE=11Positioning only.
Shot 4RATE=01Pocket balls 1 and 3.
Shot 5RATE=05Pocket ball 6.
I almost didn't believe it can get ball 6 without a positioning shot.

Stage 37, Circular with smaller wall in the middle

Shot 1RATE=06Positioning only.
Shot 2RATE=01Pocket balls 1, 3, 5 and 6.
Shot 3RATE=11Positioning only. Some cursor movement detected. Push ball 4.
Shot 4RATE=01Pocket balls 2 and 4. Some cursor movement detected.

Stage 38, Standard board revisited

Shot 1RATE=05Positioning only.
Shot 2RATE=01Pocket balls 3, 5 and 6.
Shot 3RATE=08Pocket balls 1 and 2 without hesitation.
Shot 4RATE=12Pocket balls 4.

Stage 39, Little teeth here and there revisited

Shot 1RATE=13Pocket balls 1 and 2.
Shot 2RATE=17Positioning only.
Shot 3RATE=01Pocket balls 5, 6 and 7. Uses ball 6 as projectile.
Shot 4RATE=08Pocket balls 3 without hesitation.
Shot 5RATE=09Positioning only.
Shot 6RATE=01Pocket ball 4. Slow, slow cursor.

Stage 40, Dot dot dot

Shot 1RATE=02Positioning only. Pushes ball 1.
Shot 2RATE=01VANQUISH balls 3, 4, 5 and 6. Music stops.
Shot 3RATE=11VANQUISH balls 1 and 2.
Shot 4RATE=15Positioning only.
Shot 5RATE=01Pocket ball 7.
The glitch used in this stage took me completely by surprise.

Stage 41, Octagon with many adjacent pockets revisited

Shot 1RATE=02Pocket balls 4, 6 and 7. Ball 2 used as projectile.
Shot 2RATE=09Positioning only.
Shot 3RATE=01Pocket balls 1, 2, 3 and 5.

Stage 42, Clamp the middle revisited

Shot 1RATE=11Positioning only. Push ball 3, 4, 5 and 6.
Shot 2RATE=01Pocket balls 2, 3 and 4.
Shot 3RATE=08Positioning only.
Shot 4RATE=01Pocket balls 1, 5 and 6.

Stage 43, Walls and corridors revisited

Shot 1RATE=08Positioning only. Touch ball 1.
Shot 2RATE=01Pocket balls 1, 2 and 3.
Shot 3RATE=08Pocket balls 4 and 5 without hesitation.
Shot 4RATE=12Pocket balls 6 and 7 without hesitation.
Pocketing ball 7 is what they would call a "lucky shot".

Stage 44, Superposition of two stage 02s revisited

Shot 1RATE=16Positioning only.
Shot 2RATE=01Pocket balls 1, 2 and 3.
Shot 3RATE=08Positioning only.
Shot 4RATE=01Pocket balls 4, 5 and 6.

Stage 45, Greater-than sign revisited

Shot 1RATE=08Positioning only. A chain reaction affecting balls 1, 2, 3 and 4.
Shot 2RATE=01Pocket balls 1, 2 and 4.
Shot 3RATE=08Positioning only.
Shot 4RATE=01Pocket balls 3, 5, 6 and 7.

Stage 46, Ziggurat revisited

Shot 1RATE=11Positioning only. Push ball 1.
Shot 2RATE=01Pocket balls 2, 5 and 6.
Shot 3RATE=08Positioning only.
Shot 4RATE=01Pocket balls 3, 4 and 7.
Shot 5RATE=08Pocket ball 1.

Stage 47, Corner oriented revisited

Shot 1RATE=09Pocket balls 1 and 4. Disturb the position in general.
Shot 2RATE=13Pocket ball 2. Score += 260, (2*13)*10.
Shot 3RATE=14Positioning only.
Shot 4RATE=01Pocket balls 3, 5 and 7. Push ball 6.
Shot 5RATE=08Pocket ball 6. And almost the cue ball, too.

Stage 48, Reminds me of the union jack revisited

Shot 1RATE=09Positioning only. Push ball 6.
Shot 2RATE=01Pocket balls 3, 4, 5 and 6.
Shot 3RATE=11Positioning only. Push ball 7.
Shot 4RATE=01Pocket balls 1, 2 and 7.

Stage 49, Four corner compartments revisited

Shot 1RATE=08Positioning only.
Shot 2RATE=01Pocket balls 1, 5 and 6.
Shot 3RATE=08Positioning only.
Shot 4RATE=01Pocket balls 2, 3 and 4.

Stage 50, Left-pointing arrow revisited

Shot 1RATE=08Positioning only.
Shot 2RATE=01Pocket balls 2 and 6. Disturb the position in general.
Shot 3RATE=05Pocket balls 4 and 5 without hesitation.
Shot 4RATE=09Pocket ball 3 without hesitation.
Shot 5RATE=10Pocket balls 1 and 7 without hesitation. Score += 870, (1*10 + 7*11)*10

Stage 51, Diagonal compartments revisited

Shot 1RATE=14Positioning only. Push ball 1.
Shot 2RATE=01Pocket balls 2 and 4. Balls 1 and 5 used as projectiles.
Shot 3RATE=05Pocket balls 1 and 5 without hesitation.
Shot 4RATE=09Positioning only.
Shot 5RATE=01Pocket balls 3 and 6.

Stage 52, As board 01, but with shark tooth edges revisited

Shot 1RATE=05Positioning only.
Shot 2RATE=01Pocket balls 2, 4 and 5.
Shot 3RATE=08Positioning only.
Shot 4RATE=01Pocket balls 1, 3, 6 and 7. Ball 6 used as a projectile.

Stage 53, Forward slash revisited

Shot 1RATE=11Positioning only.
Shot 2RATE=01Pocket balls 2, 3, 4 and 5. Ball 1 used as a projectile.
Shot 3RATE=11Positioning only.
Shot 4RATE=01Pocket balls 1, 6 and 7.

Stage 54, Circular with smaller wall in the middle revisited

Shot 1RATE=08Positioning only. Push ball 7.
Shot 2RATE=01Pocket balls 4, 5, 6 and 7.
Shot 3RATE=11Pocket balls 1, 2 and 3.

Stage 55, Choice of five revisited

Shot 1RATE=18Positioning only.
Shot 2RATE=01Pocket balls 1, 3, 4 and 5.
Shot 3RATE=11Pocket ball 2 without hesitation.
Shot 4RATE=12Positioning only.
Shot 5RATE=01Pocket balls 6 and 7.

Stage 56, Walls point towards a drain revisited

Shot 1RATE=05Positioning only. Push balls 1 and 2.
Shot 2RATE=01Pocket balls 2, 3 and 4.
Shot 3RATE=08Positioning only. Push ball 1.
Shot 4RATE=01Pocket balls 1, 5 and 6.
Shot 5RATE=08Pocket ball 7.

Stage 57, X shape with sixteen pockets revisited

Shot 1RATE=09Positioning only.
Shot 2RATE=01Pocket balls 2, 3, 4 and 5. Uses ball 3 as a projectile.
Shot 3RATE=11Positioning only.
Shot 4RATE=01Pocket balls 1, 6 and 7. Trades motion energy twice with ball 1.

Stage 58, Horizontal walls revisited

Shot 1RATE=08Pocket balls 1 and 2.
Shot 2RATE=12Positioning only.
Shot 3RATE=01Pocket balls 4, 5 and 7.
Shot 4RATE=08Positioning only.
Shot 5RATE=01Pocket balls 3 and 6.

Stage 59, Dot dot dot revisited

Shot 1RATE=05Positioning only. Pushes ball 7.
Shot 2RATE=01Pocket balls 1, 2, 3 and 4.
Shot 3RATE=11Pocket ball 5 without hesitation.
Shot 4RATE=12Positioning only. Touch ball 6.
Shot 5RATE=01Pocket balls 6 and 7.

Stage 60, LB revisited

Shot 1RATE=05Positioning only. A chain reaction affecting balls 1, 2 and 3.
Shot 2RATE=01VANQUISH balls 1 and 2. Disturb the position in general. Music stops.
Shot 3RATE=05Positioning only. Push balls 4 and 5.
Shot 4RATE=01VANQUISH ball 3 and pocket balls 5 and 7.
Shot 5RATE=08Positioning only. Touch ball 4.
Shot 6RATE=05VANQUISH ball 4 and pocket ball 6. MOVIE END
After shooting the last shot, the input is terminated. The triumphal ending is seen after the board is completed.

Other comments

Thanks to:
  • Comicalflop
  • qFox
  • Derakon
  • Xkeeper
  • Adelikat
  • Nach
  • Bisqwit
  • Jemini, Teramoto, Miyamoto, Yunoki and Niitani -- the Compile crew credited in the game

FractalFusion: Set to delayed while the author works out improvements.

Bisqwit: Framecount goes from 85834 to 85792 in this update. Submission is "new" again. And I think, unfortunately, it will probably still fail for some emulators. At least the stage 60 has now been exhaustively tested.
FractalFusion: Accepting for publication on technical merit alone.