Upgrades and games !

Having been a Linux advocate for nearly 20 years I was converted to using a mac after working on Device Management project which was soley built around iOS and OS-X, so i used a mac on a daily basis. After that i was hooked and bought my first imac, an older 2nd model, but stilll good enough. When Mojave came out, I upgraded once more, again to a 2nd hand machine, but long and the short this machine was not capable of running Unity and Python scripts that ran quickly on Linux/Ubuntu were slow on it also.

As I needed to at least explore Unity and I also had Work (non academic) needs fo anew machine bought myself a decent spec imac, brand new !

2020 imac, it smelt as good as it looked out the box

I was then able to reinstall Unity and start building games/following tutorials.

Unity Looks gorgeous !

I followed the toutorials to get started with Unity. I found it very enjoyable and amazing on what this software can achieve.

Processes: 583 total, 2 running, 581 sleeping, 3061 threads            21:08:52
Load Avg: 2.89, 3.97, 3.92  CPU usage: 2.13% user, 1.71% sys, 96.15% idle
SharedLibs: 605M resident, 101M data, 108M linkedit.
MemRegions: 287343 total, 17G resident, 369M private, 4886M shared.
PhysMem: 51G used (6305M wired), 77G unused.
VM: 4262G vsize, 2305M framework vsize, 0(0) swapins, 0(0) swapouts.
Networks: packets: 24934358/25G in, 64148466/53G out.
Disks: 1227896/57G read, 4118049/56G written.

PID    COMMAND      %CPU  TIME     #TH    #WQ  #PORTS MEM    PURG   CMPR PGRP
133    WindowServer 10.3  06:35:06 26     17   3779+  959M-  4736K  0B   133
24728  Unity        9.0   02:01.42 117    4    1396   815M   3260K  0B   2472

Even on a modern Mac Unity was taking its fair share of resources. I thought about the Netlogo app I had run because I couldnt get Unity to run. I was really impressed with that, even on an older mac, so I installed it on this newer model.

Pacman in NetLogo impressed me ! (credits to Uri Wilensky)

I found the code incredbly easy to read as well. It reminds me of a mixture of Pascal, Python and Basic.

AppProCon
UnityIt looks amaazingThe UI has to be learnt to get anywhere
NetLogoIts very human-readable codeThe graphics output (in 2d) are based on Python/Turtle
UnityIt has complex AI featuresLearn how to use them within the UI and to build the app
NetLogoHas complex AI FeaturesThese have to be learned and is alot more theortical.
UnityIt can create publishable games to industry standard“Pro” requires a subscription, not unlike Apples Development method to get apps into the App Store
NetLogoIt is light on resources allowing multiple applications to runIts not as ‘pretty’as unity
considering the pros and cons of Unity and NetLogo

I think the most critical factor is that in the marking of the assignment we are not assesed on how the game looks, moreso on the AI. As I really want to get a excellent grade that is persusasive enough for me to go down the NetLogo route rather than Unity.

New books and a game !

After reviewing the learning materials so far 2 books stood out, Artificial Intelligence: A Modern Approach, Global Edition (Russel/Norveg 2016) and Agent-Based Modeling (Wilensky, Rand 2015). The AI book is a weight tome ! but its already getting well dog-earred. I’m not pretending i can learn everything in it in one semester, its almost a whole academic year (if not more) worth of material in there.

I particuarly like the Agent Based Modelling book as its all around NetLogo and goes into very technical AI – exactly what the assignement is looking for. Its easy to read and makes me want to do all the exercises in it, but I will be practical and focus on what ones will deliver some form of ‘game’.

I got the Alien game and Headphones as I’ve not played alot of games on the PS4, and I want to make videos of myself palying it to see how emmersed i become in the game. I’ve heard its very good on the AI and can be even quite frightining ! Looking forward to makign those videos of me playing soon !

5/2/21

Had an interesting day. I have had unity installed since last year, but not followed the tutorials as waited for the lecture to start. I loaded the karting simulation which on my mac took along time. Once it started, all the fonts were corrupted, so i could not follow the tutorial.

I then loaded NetLogo, and followed the tutorials – i have to say i was really amazed at what this application could do with such “basic” code. Having just completed the python/turtle assignment in the last semster, the code which produced AI, albeit basic, was amazing. Very high level and easy to read (reminded me of BBC B Enhanced BASIC language).

I tried the demos, first the tutorial, the wolf/sheep simulation, getting anquiated with the various methods to stop and start a simulation and the button types. I really enjoyed the wolf/sheep/grass simulation and once I had completed the tutorial and looked at the code, started to look at other routines in the library.

As we are doing gaming and AI, i loaded ‘pacman’, and whilst basic, it was a really enjoyable game ! I tested it thoroughly for all the features. I was amazed at the code, at 342 lines, could produce such good results, not just the game, but the AI in the game, how the ghosts ‘looked’ for the pacman, and once ‘energized’ ran away, the code was so simple, but produced great results ! I am quite tempted to use NetLogo, but have ordered a more powerful mac to help me with both my professional work and my academic studies as my current mac (Late 2013 model) is really showing its age.

I also looked at the fractal routines, having run similar code in Python and was impressed how quick the mandlebrot fractal and UI worked so well. It was far faster than the Python code, which told me the python interpreter for iOS must be very inniefficent, as the code in function for Python was far more complex/detailed than the high level code (lograthamic/expotential) than what was used in NetLogo.

I played for one hour on the tutorials and have really enjoyed NetLogo. My new mac arrives by Monday and I will load Unity onto it, but I know that working with Net Logo will also produce really good results. The AI is very simple to interface, and powerful in results.

I do not have much time to play games, but do own a Playstation 4, mostly i used it for Netflix, Amazon Prime and Disney+, but as I’m doing Gaming AI wanted a game to play. I looked at games which had good AI here and after reading the descriptions and forming a short-list went onto research “Alien:Isolation”. The Wikipedia post convinced me, as a stand-alone 1st person AI game, it was the right one for me. I dont have time for multiplayer games, and the reviews for “Alien: Isolation” really stood out. I ordered the game and a headset, as the AI picks up on sound and wanted to experience the full emersiive experience ! I look forward to trying it out, but I dont think my wife will be watching whilst i play, unlike our Korean films on Netflix…

In our taught lesson I enjoyed the week 2 learning, the key points of AI in as various was really was really an eye opener. Opponent/Team Mate/Director/Scenery and Architecht, there is ALOT of what AI is doing in which we might otherwise not notice or just take for granted. One thing I do like about my ‘age’ is having experienced games from the 1970’s all the way to now and being able to reference this different types. Even on an Atari 2600, there is some degree of all of those AI features, albeit at a rudementray level compared to the immersive features in todays gameplay.

The part on ‘spawning’ was of very interesting and well articulated into terms i could understand. Having played games where most advesorys ‘spawned’ from the same point, this was interesting breakdown of modern games. I’m looking forward to experiencing this first hand in the ‘alien’ game. Where the alien cannot be defeated, so ‘spawning’ will be interesting in this game.

I continue to think about my own game, based on WSTJX and how i can model that. I first need to ‘render’ a world, quite literraly of the world broken into Maidenhead grid locators. I know it will be possible to make a global map in both Unity and NetLogo, but i think the visual experience will be richer in Unity, but from a computational basis, am confident that NetLogo can bring the game alive also. The section on PCG (Procedural Content Generation) gave me inisights on how i might render my ‘world’ and the things i put into it.

I ordered another books to help with my AI Studies, which come from the NetLogo tutorial.

  • An Introduction to Agent-Based Modeling: Modeling Natural, Social, and Engineered Complex Systems with NETLogo (The MIT Press)

I also reached out to my Machine Learning / AI teacher from semester 1, whilst i had to leave the module due to work load, i do have the book she published (Pattern Recognition and Neural Networks, Ludmila Kuncheva) as I think the AI/ML concepts she was teaching will nicely augment what we are learning in this module.

04/02/21

Things i have done this week.

I’m brainstorming ideas for a game, of course my ‘hobby’ is amateur radio, something i love, and I think passion helps a project ! I thought a cool game that could feature realtime elements is something like WSJT-X FT8 where you are the radio wave and you ahve to make the link, scoring more for further distance contacts, the atongists could be weather conditions/illegal transmissions,etc that you have to ‘avoid’ to ‘land’ the ‘contact’ (QSO). Anyhow, early days.

The mention of real time made think about the last time i done coding with graphics architecture – that was on the Amiga 1200 in Assembler ! There are plenty of good gaming engines.. but think I will stick with Unity as it looks a great tool and being an ‘industry’ known one, likely to provide more cohesion with the real world (Amiga was niche when it was around, now its just am-what ?)

I found the video presentation of the Week 1 lecture suprisingly engaging. I dont mind saying its easy for me to drift off at the end of a long day of work (I work 9-5, more like 8-6), but the lesson was really well broken down and good to follow, albeit an introduction to the module, it gives me the confidence it will be delivered really well, albeit remotely. That damn spider still scared the hell out of me though.

Also I booked mark the Game AI Pro site – this looks very promising and good to read (http://www.gameaipro.com/) (p.s. not sure if we should be using harvard referencing in our blogs).