UCT CSC3022 / 2024
Rearranging an image into tiles
A command-line image tile manager loading PGM input and swapping tiles for a sliding-puzzle exercise.
UCT / COURSE CONTEXT / 2024
CSC3022F · C++ and Machine Learning
C++ language and memory-model foundations followed by Python-based machine-learning implementation.
2026 PORTFOLIO RECREATIONS
Sliding image puzzleENGINEERING PERSPECTIVE
Inside the work
Represent a raster as movable tiles and reason about state changes. The coursework combines command-line parsing, image loading and tile manipulation rather than an AI puzzle solver.
- C++ / TileManager
- Construct and manage image-tile state.
- PGM / CLI
- Read grayscale input and parse size, image and move-count options.
Load the raster
Parse driver options and read the grayscale image.
- State representation
- Tile position is distinct from the image pixels belonging to each tile.
- Legal transitions
- A valid swap must preserve the tile set and satisfy movement rules.
- Input contracts
- Size and raster dimensions need validation before indexing or partitioning.
What the demonstration establishes
The browser puzzle is a new synthetic visual illustration. The original command-line source was inspected, not rebuilt here, and no original graphical interface is claimed.
Evidence behind this page
Azhar-named driver, TileManager and loader sources. Supplied image fixtures are not republished.
How it works
The driver parses size, image and move-count options, loads a grayscale raster, constructs a TileManager and requests tile swaps.
Results & recovery
- Source establishes image-based tile manipulation rather than only an ASCII or text puzzle.
Technical limitations
No verified interactive GUI is present. The original implementation was inspected, not rebuilt during this launch; supplied sample-image rights are unresolved.
What I would improve now
Validate arguments, test legal swaps and state invariants, then regenerate output from an original or synthetic input image.