Mark's 2048+ • BEJEWELED Kinetic Edition • Apple IIe 1984
PUREBASIC 6.41 X64 • ZERO EXTERNAL ASSETS • OPEN SOURCE AT MARKF.DE
PROJECT 01 // SCALING & THE COGNITIVE THRESHOLD
Mark's 2048+ (PureBasic Edition v024)
Upon a modest 4x4 board of sixteen squares, practically every mortal considers himself a strategist of some distinction. One tucks one's highest tile neatly into a corner, reckons two moves ahead, and entertains the agreeable illusion of being altogether master in one's own house. Mark's 2048+ systematically dismantles that comforting arrangement: contained within a single native PureBasic file, the arena scales seamlessly from 4x4 through 20x20 and 200x200 right up to 1000 x 1000 squares — a full million concurrent cells, wherein each square corresponds precisely to a single screen pixel.
Those who endeavour to play manually upon 4x4 or 5x5 are rewarded with a crisp 95-millisecond gliding interpolation and may, by pressing H, summon the integrated HINT module: down in the lower-right corner, the 8-bit beckoning cat forthwith suspends its oscillating wave and gestures with both paws in the precise direction pre-calculated by the Expectimax algorithm in the background. By pressing T, one may assume manual command of an active AI board at any juncture; by pressing C, the programme writes an uncompressed Full HD BMP (2048_<Grid>_<MaxCell>.bmp) directly into its working directory from whichever state happens to prevail.
Why This Programme Is Scarcely an Innocent Diversion
A great deal is spoken of superintelligence, for the most part in airy abstractions. In Mark's 2048+, however, one registers the gulf viscerally at one's own keyboard. As early as 8x8, human foresight rather falters; beyond 30x30, one is merely administering white noise. Engage the autonomous solvers and the turbo mode (S), by contrast, and the machine prosecutes thousands of state evaluations per second without the slightest hint of fatigue across an expanse for which our biological working memory quite simply lacks the requisite registers. Precisely that sobering jolt — if one may be permitted an observation — constitutes the entire purpose of the exercise.
Technical Cornerstones Within the Source Code
Logarithmic Storage in Lieu of Overflow: The engine stores neither 2048 nor 65536, but solely the base-2 exponent (1 for 21, 11 for 211). Consequently, a merge entails nothing more extravagant than an addition of +1, whilst simultaneously yielding the colour index.
Zero-Allocation During Execution: All arrays are statically dimensioned once upon start-up. ShiftLineInPlace compacts every row and column directly within existing memory by means of two pointers, never once petitioning the system for fresh memory blocks.
64-Bit Bitboard & Pre-Calculated Row Tables: For the 4x4 AI laboratory (Mode 5), all 16 squares of 4 bits apiece reside within a single 64-bit quad register. All 65,536 conceivable row transitions are pre-computed once at initialisation, enabling the Expectimax search tree and its Zobrist transposition table to evaluate moves via pure table lookup.
BEJEWELED — Mark Fischer Kinetic Op-Art Edition (PureBasic v007)
UNITÉS PLASTIQUES // 8x8 TO 80x80M. FISCHER 007/2026
Rather than indulging in garish confectionery graphics, this second PureBasic endeavour by Mark Fischer translates the match-3 principle into an autonomous, framed museum piece composed of calculated chromatic dynamics and geometrical precision. Every individual cell constitutes a sculptural module mathematically constructed by my own hand: a luminous ground square housing an exactingly fitted interior figure — a concentric depth disc, a tilted axonometric cube, a nested square, a cleft hemisphere, or a rotating contrast singularity.
Via presets (8, 16, 32, 64, 80), fine increments, or the mouse wheel, the canvas scales dynamically during live execution up to 80 x 80 = 6,400 kinetic Op-Art units within a collector's frame calibrated to the pixel at 1920x1080, complete with a French mount and signature plaque. A right-click (Pure Artwork Mode) banishes every control console forthwith, converting the monitor into a pure kinetic wall painting across which the autonomous AI solver silently conducts chromatic waves and chain reactions through the geometry.
Architecture & Particulars of Edition v007
Three Switchable Exhibition Palettes & Gallery Wall Toggle: Switch at the touch of a button between a pale alabaster museum wall and a black exhibition chamber, as well as amongst three bespoke exhibition colour schemes composed expressly by Mark Fischer (Atelier Gold-Cobalt, Kinetic Spectrum, and Monochrome Contrast).
7x7 Optical Precision Magnifier: So that the board remains manually playable even when populated by 6,400 diminutive 11x11-pixel cells, the right-hand console presents a zero-latency real-time magnification of the cursor neighbourhood, complete with coordinate readout.
Local O(N²) Match Evaluator & Rigorous Integer Geometry: The AI solver evaluates swaps across the 80x80 grid with zero perceptible latency; every drawing routine is fortified with strict SafeBox/SafeCircle guards and pure integer bitwise logic, rendering it 100 per cent impervious to compiler or debugger overflows under PureBasic 6.41.
Where It All Began: 64 Kilobytes of RAM and Self-Playing BASIC Strategies
Both present-day engines stand in an unbroken lineage descending from my earliest programmes of 1983 and 1984 upon an Apple IIe. In those days, one enjoyed neither internet forums nor off-the-shelf libraries. Whosoever wished to ascertain which poker strategy prevailed in the long run, or how one might eschew predictable human entry patterns in the national lottery so as not to share one's dividend with a thousand like-minded punters upon striking lucky, was obliged to compose the simulator byte by byte in Applesoft BASIC.
Even that 1984 poker programme played thousands of hands against itself, logged probabilities with due rigour, and consigned feeble parameters to the waste-paper basket. The underlying principle has scarcely shifted by a single millimetre in more than forty years — only the clock frequency has moved on somewhat.