A360923 Table T(i,j), i >= 0, j >= 0, read by antidiagonals giving the smallest number of moves needed to win Integer Lunar Lander, starting from position (i,j). Game rules in comments.
0, 2, 1, 3, 3, 4, 4, 4, 5, 7, 4, 5, 6, 7, 9, 5, 5, 6, 8, 10, 12, 5, 6, 7, 8, 10, 12, 14, 6, 6, 7, 9, 10, 12, 14, 17, 6, 7, 8, 9, 11, 13, 15, 17, 19, 6, 7, 8, 9, 11, 13, 15, 17, 19, 21, 7, 7, 8, 10, 11, 13, 15, 17, 19, 22, 24, 7, 8, 9, 10, 12, 13, 15, 17, 20, 22, 24, 26
Offset: 0
Examples
For the starting position (2,3), a 6-move solution is (1,4), (0,4), (-1,3), (-2,1), (-1,0), (0,0). No shorter solution is possible, so T(2,3) = 6. The upper left corner of the table i: 0 2 3 4 4 5 1 3 4 5 5 4 5 6 6 7 7 8 9 10 12 The first few antidiagonals are 0 2 1 3 3 4 4 4 5 7 4 5 6 7 9
References
- Martin Gardner, "Sim, Chomp, and Race Track", "Mathematical Games", Scientific American, January, 1973. Reprinted in "Knotted Doughnuts and Other Mathematical Entertainments", W. H. Freeman, 1986, pp. 109-122.
Links
- Rémy Sigrist, Table of n, a(n) for n = 0..10010
- Hans Havermann, Transcription of Gardner's account of the 2-D game.
- Rémy Sigrist, C++ program
- Rémy Sigrist, Scatterplot of (i, j) at an even number of moves from (0, 0) with abs(i), abs(j) <= 400
- Rémy Sigrist, Scatterplot of (i, j) at up to 400 moves from (0, 0) (the color is function of the number of moves)
- Wikipedia, Racetrack (game) (a 2D version), as of June 2022.
Programs
-
PARI
M360923=Map(); T360923=0; S360923=[[0, 0]]; A360923(v, x)={iferr(mapget( M360923, [v,x]), E, while(!setsearch(S360923, [v,x]), foreach(S360923, vx, vx[1]>=0 && mapput(M360923, vx, T360923)); S360923 = Set(concat([[[u,vx[2]-vx[1]] | u<-[vx[1]-1..vx[1]+1], !mapisdefined(M360923, [u,vx[2]-vx[1]])] | vx <- S360923, vx[2]>=vx[1]])); T360923 += 1); T360923)} \\ M. F. Hasler, Feb 27 2023 T(i,j)=if(i,T(0,j+i*(i-1)\2)+i,j,sqrtint(4*j-3)+1) \\ Implementing Conjecture 2. - M. F. Hasler, Feb 27 2023
-
Python
# From M. F. Hasler, Feb 27 2023: (Start) def A360923(v, x, A={0:0, 1:{(0,0)}}): if (v,x) in A: return A[v,x] while (v,x) not in A[1]: A.update((vx,A[0]) for vx in A[1] if vx[0]>=0); A[0] += 1 A[1] = {(u,x-v) for v,x in A[1] if x >= v for u in range(v-1,v+2) if (u,x-v) not in A} return A[0] # (End)
Extensions
More terms from Rémy Sigrist, Feb 26 2023
Comments