Infinite Mario

Originally from, which should be used if possible.


The action integers are an array of length 3: {[-1,1], [0,1], [0,1]}. They correspond with the buttons on a Ninendo controller, {direction pad, A, B}


The state space has no set specification, as its intArray and doubleArray sizes can grow depending on how many monsters are visible at any given time. The charArray is a constant size, representing the layout of the visible tiles.

intArray[0] is the x coordinate of the left-most visible tile, used to align the tiles represented in the charArray to the world.

For every monster, two values are appended to the intArray and 4 values are appended to the doubleArray. The values appended to the intArray are [type, winged]. The values appended to the double array are [x, y, x speed, y speed].

x and y are aligned with the tiles, but can have in-between values. x and y speed are in tiles per step.

The monster types are:

If an enemy is winged, it bounces.

The charArray is a set of 16 rows separated by carriage returns, each with 21 chars. Thus, there are 16*(21+1)=352 elements in the charArray. Each element represents a tile in the game. The row a tile appears in determines its y position, the last row being y=0, and y increasing as the row number decreases. The x position is determined by the column + the offset found in intArray[0]. If the charArray is printed to a terminal, it will look like the game, without the monsters.

The tiles can be any of the following:

Tiles with x position < 0 are considered always solid.