A Forgotten Secret

A secret very few people know, I was once a programmer! I spent 2 years learning GW Basic and wrote a few mini games in early 1990s!

Coding Mini Games

I still remember vividly, how we started the GW Basic programming from variables, to loops and logics, as well as the amazing RND function to help make random numbers for games!

The coding were done in MS-DOS environment with command lines on a text-based black screen!!!

I wrote a few mini games with GW Basic, starting with simple BlackJack, shooting game, then a horse racing game with moving Alphets to mimic running horse (LOL).

First Puzzle Game

The final assignment was to write an algrithm to solve a randomised 5×5 numbering puzzle.

Game start with a randomised 1-24 numbers inside the 5×5 checkers with only 1 empty box.

Only the adjacent numbers can slide 1 step towards the empty box.

Player can play the game manually by using the arrow keys on keyboard. Multiple players can play in turn and who can sort the numbers from 1-24 the quickest WINs.

Then there was a “Autosort” button, when clicked, the computer can sort the puzzle by itself to complete the 1-24 sequence!

The Sorting Algorithm

Making the game for user play was not easy, and it was even more challenging to write the 1 click sorting algrithm!

The computers were powered by 80286 chips, running on 1.44Mb floppy disks, and AI was non-existence then!

We can only try to solve the sorting problem with simple algrithm. My solution was to comparing the numbers nearby the empty box, then move the smallest number towards the top left direction with nested loops!

With hundred lines of codes and many rounds of debugging on the dot-matrix printed sheets, the mini game works with manual play and 1 click sorting feature.

It was truly a satifying moment to witness the power of programming!

Digital Literacy Foundation

Although I never consider myself a programmer, the early programming experience paved the solid digital literacy foundation for my interest in computer science and other advanced technology.

It helped my self-learn web programming in the late 90s and worte an interactive Flash website embed in HTML!

The interactive Flash with animated UI on web was the state of art technology then beofre HTML5, CSS and JavaScript, PNG was a thing! LOL

Hype of DeepSeek

Now let’s flash back to modern time!

I’ve been closely following LLM and GenAI development since the launch of openAI‘s ChatGPT 2 years ago, and it was a little inconvenence to explore the latest GPT models due the limited regional access for HK.

Then DeepSeek shocked the world by surpassing ChatGPT as the the most-downloaded free app on the iOS App Store in the United State in 27 January 2025!

Even more, it is open source model from a Chinese startup! Put aside the unbelievable cost effectiveness to train and compute the DeepSeek R1 model, I was particularly impressed by its reseasoning capability!

Impressive reasoning model

I was messing around with DeepSeek during the CNY holidays, and decided to test its programming capability to recreate the puzzle game above.

I describe the game play logic and controls requirement to DeekSeek, turn on the DeepThink (R1) and watch it thinking through my input then reason what and how to responses.

I was truly impressed by how thoughtful and “intelligent” the reasoning model is!

It even debate and critize it’s own thoughts about conflicting alternatives and make some assumptions on what user want to do with the input.

The First Python Output Almost Work

I asked DeepSeek to use python for the coding, and was expecting some bugs to fix on the first output, however, it works quite well based on the main game logic of manual play.

With a couple rounds of chats to fix a minor bugs, soon I have a mini game for controled by WASD keys inputs.

Fixing the UI for Web

The code was tested on Collab on its functionality, however the game play experience was not great at all.

As I planned to share the mini game on my blog, I decided to adjust the code so that it can be run on web. DeekSeek was able to analysis my request and considering alternative ways to make the game playable on web page using HTML and JavaScript instead!

Now, I have a HTML code that can be test directly within DeepSeek to speed up the development & debug!

To make the co-development with AI more manageable (with the limited computing power & memory on the DeekSeek app), I need to provide the instructions step by steps just like how we program it ourself. So using some comment programming terms in your prompts would help!

Finalising the Autosort

Once the game logics are in place and working for manual play, the last part is work on the AUTO SORT button.

I first asked DeepSeek to follow my original logic to programme the auto sort. However, after some “thinking”, DeekSeek’s reasoning revealed that my original idea might not work, and given the limited resource and to be work on web page, DeekSeek suggested to cheat the Auto Sort with reverse engineering!

DeepSeek Struggled a Bit

DeepSeek struggled to get the Auto Sort right the first time, and missed to qualify the random moves for the reverse sorting. It also introduced a few display bugs when combine with multiple Reset and Auto Sort.

Nevertheless, DeekSeek was able to reason together with user’s previous conversation, and finally fixed the bugs with my instructions.

Completed 24 Puzzle Game

To finished up the mini game and share it on my blog, I’ve made a few manual adjustments and new feature of mobile controls.

Check out the completed 24 Puzzle Game here.

Follow the instructions and click “Start Game” for manuel play, or click “Auto Sort” to see the sorting animation.

Have Fun!

Digital Literacy

In the Era of AI, digital literacy becomes a fundamental skill that impacts nearly every aspect of our lives.

I’m very grateful to have learnt programming in my early days, and plant the seed of logical and systematic problem solving skill. The fundation also empowered continous learnings of new digital tools & technology, from web development, generative design, to Blockchain and now Artificical Intelligent etc…

As we continue to navigate the UVCA digital world, investing in digital literacy education for our next generation is critical to foster a more informed and empowered digital natives to innovate bigger and faster for a better future!