Engineering Lab

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.

C++PGM imagesTile management

UCT / COURSE CONTEXT / 2024

CSC3022F · C++ and Machine Learning

C++ language and memory-model foundations followed by Python-based machine-learning implementation.

Science handbook · 2024

ENGINEERING 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.
STEP 1 / 3

Load the raster

Parse driver options and read the grayscale image.

Source-derived walkthrough

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.

NEXT IN THE ARCHIVETwo request guards at the web boundary