Friday, 6 October 2017

RetroChallenge 2017/10: Atanarjuat

Atanarj
This was just a silly little program I put together over the course of an evening. I don't know where the idea came from. Probably while browsing images of 8-bit Basic games.  I think I saw a picture of a simple maze that used the basic principle of alternating vertical lines with random hole put in them.  The thought struck me that the number of random passages would determine the difficulty of the maze. Then I thought, hey could an A.I. beat a human being in navigating such a maze?  I mean, it could be made to ruthlessly search for a way across as it moved up and down, but unlike a human it could not survey the maze as a whole to discern where the zones of parallel horizontal passages were most richly laid out and navigate towards them. So I made an A.I. that just moves up and down the passages seeking a way right.  It takes the first way it finds and continues right until blocked.  If it hits a block at top or bottom, it reverses directions and continues looking for a right passage. Of course, creating an algorithm that is fast took a little thinking, but I got one that allows plenty of time to pole the user for input so that navigation for the player is pretty smooth. The brute force of the computer provides a real challenge for a human player. I fiddled with the number of passages for each row to a point that I felt the game was challenging, but not impossible for a human to sometimes beat the computer. In future I might play a little with the variables that draw the maze and see if making more passages makes it much harder or easier to beat the computer.  I named the game after a legendary Inuit character "The Fast Runner" or Atanarjuat.  There is also a famous film made by an Inuit director of that name. The story originally centres on a clan feud and monumental revenge quest. So in my game I decided to add the feature of being able to hit space and lay down a "block", which can trap the computer player in a row if placed right.
I've managed 3 wins against the computer out of 5 but never higher than that. If you manage better hit the F11 key in the VMC10 emulator to take a screen shot, or snap a picture and send it to me!  Also, the program is small enough and simple enough to fit in 4K, so it's available for those MC-10ers out there who like using the real hardware, but who don't have a 16K RAM expansion.  Enjoy.

No comments:

Post a Comment