Stuart Mathews
  • Home

    Latest

    • Functional XML (Game Development) 19-02-2023
    • Midnight in Paris (Blog) 04-01-2023
    • Christmas Run (Running) 26-12-2022
    • So far, it works (Game Development) 25-12-2022
    • Traveling Europe (Blog) 01-11-2022
    • Applying and Evaluating Pattern-Oriented Designs In Improving Code Quality In Complex Software (Code) 01-10-2022
    • Knoydart Peninsula, Scotland (Running) 01-10-2022
    • CppGameLib (Game Development) 12-09-2022
    • Thoughts on Multiplayer Game Co-operation and Distributed Computing (Game Development) 04-07-2022
    • The fading importance of ego and the utility of the checklist (Blog) 18-04-2022

    Most Read This Year

    • Thoughts on Multiplayer Game Co-operation and Distributed Computing (Game Development)
    • The fading importance of ego and the utility of the checklist (Blog)
    • Differential Calculus (Blog)
    • Traveling Europe (Blog)
    • Knoydart Peninsula, Scotland (Running)
    • CppGameLib (Game Development)
    • Applying and Evaluating Pattern-Oriented Designs In Improving Code Quality In Complex Software (Code)
    • So far, it works (Game Development)
    • Christmas Run (Running)
    • Midnight in Paris (Blog)

    Recently Featured

    • Functional XML (Game Development)
    • So far, it works (Game Development)
    • Thoughts on Multiplayer Game Co-operation and Distributed Computing (Game Development)
    • A software engineering process for delivering software (Code)
    • Encrypting strings at rest (Code)
    • ISO27001, Machine-Learning and Game dev (Blog)
    • Implementing a Vignette (Code)
    • Fixing the thunder in my feet (Running)
    • Sufficiently Complex (Blog)
    • Try Monad, Progress and Lockdown Rules (Blog)
    • Downloads
  • Blog

    Recent in Blog

    • Midnight in Paris 04-01-2023
    • Traveling Europe 01-11-2022
    • The fading importance of ego and the utility of the checklist 18-04-2022
    • Differential Calculus 14-04-2022
    • Fading importance and the utility of lists 29-12-2021
    • Abstractions and Patterns 11-10-2021
    • Mind Maps 02-10-2021
    • ISO27001, Machine-Learning and Game dev 23-04-2021
    • Sufficiently Complex 02-12-2020
    • Deadlocks and databases 19-10-2020

    Most Read In Blog This Year

    • The fading importance of ego and the utility of the checklist (Blog)
    • Differential Calculus (Blog)
    • Traveling Europe (Blog)
    • Midnight in Paris (Blog)

    Featured In Blog

    • ISO27001, Machine-Learning and Game dev (Blog)
    • Sufficiently Complex (Blog)
    • Try Monad, Progress and Lockdown Rules (Blog)
    • Rails, Euclid and Generating Mazes (Blog)
    • Set Theory, Ruby and Upgrades (Blog)
    • Time shifting, CS algorithms and Game Architecture (Blog)
    • The Fourier transform, math, malware and decoupling (Blog)
    • Encryption and network protocols (Blog)
    • Mazer Game Design and Network Security (Blog)
    • Changing object states and 3D transformations (Blog)
  • Code

    Recent in Code

    • Applying and Evaluating Pattern-Oriented Designs In Improving Code Quality In Complex Software 01-10-2022
    • Polynomial Calculator 16-03-2022
    • A software engineering process for delivering software 27-02-2022
    • Counting and Permutations 08-02-2022
    • Encrypting strings at rest 10-12-2021
    • Implementing a Vignette 26-01-2021
    • Functional programming paradigms and techniques 19-07-2020
    • Ruby RSpec let and let! diffirences 08-07-2020
    • Convolution, Running and Finite State Machines 08-03-2020
    • LanguageExt tutorial, games and timing 08-08-2019

    Most Read In Code This Year

    • Thoughts on Multiplayer Game Co-operation and Distributed Computing (Game Development)
    • CppGameLib (Game Development)
    • Applying and Evaluating Pattern-Oriented Designs In Improving Code Quality In Complex Software (Code)
    • So far, it works (Game Development)
    • Functional XML (Game Development)

    Featured In Code

    • Functional XML (Game Development)
    • So far, it works (Game Development)
    • Thoughts on Multiplayer Game Co-operation and Distributed Computing (Game Development)
    • A software engineering process for delivering software (Code)
    • Encrypting strings at rest (Code)
    • Implementing a Vignette (Code)
    • Protocols, Packets and Prototypes (Game Development)
    • Animated aliens and alternatives algorithms (Game Development)
    • Retro sounds, Event Manager and some running (Game Development)
    • Basic key frame animations, implicit casts and some other aspect (Game Development)
  • Running

    Recent in Running

    • Christmas Run 26-12-2022
    • Knoydart Peninsula, Scotland 01-10-2022
    • Winter running 09-12-2021
    • Itchy legs and tracksuit bottoms 03-09-2021
    • Heart rate inconsistency 26-04-2021
    • Chequered Leaves and the Yellow Runner 01-01-2021
    • Fixing the thunder in my feet 04-12-2020
    • Faster than usual 17-06-2020
    • The uncomfortable steady-state 03-06-2020
    • Hot weather running 31-05-2020

    Most Read In Running This Year

    • Knoydart Peninsula, Scotland (Running)
    • Christmas Run (Running)

    Featured in Running

    • Smashrun
    • Strava profile
  • Gaming

    Recent in Gaming

    • Functional XML 19-02-2023
    • So far, it works 25-12-2022
    • CppGameLib 12-09-2022
    • Thoughts on Multiplayer Game Co-operation and Distributed Computing 04-07-2022
    • Applying and Evaluating Functional Programming Paradigms and Techniques in Developing Games 19-02-2022
    • Christmas Period Tinkering 29-12-2021
    • Mazer Game Architecture Report 22-11-2020
    • Ruby Mazer 26-05-2020
    • Protocols, Packets and Prototypes 29-11-2019
    • Pleasure And the Execution of Thoughfulness 29-09-2019

    Most Read In Gaming This Year

    • Thoughts on Multiplayer Game Co-operation and Distributed Computing (Game Development)
    • CppGameLib (Game Development)
    • So far, it works (Game Development)
    • Functional XML (Game Development)

    Featured in Gaming

    • Game loop
    • Featured
  • Portfolio

    Featured in Portfolio

    • App-V (Citrix)
    • Citrix Fast Connect SDK
    • AppDNA
    • Cloud Copy and Paste
    • Software Audit Pro
    • Investment Manager
    • Meal tracker
    • Cross platform broker
  • About

ISO27001, Machine-Learning and Game dev

Details
Stuart Mathews
Blog
23 April 2021
Created: 23 April 2021
Last Updated: 26 April 2021
Hits: 3676

Since Implementing a Vignette, I've been pretty involved in getting various machine learning algorithms to, well learn...

I've been playing around with SIFT feature extractors, Histogram of gradients (HOG) and convolutional neural networks (CNNs) and at times it's been quite interesting.

When I started learning about machine learning techniques, I wouldn't say machine learning was of immediate interest to me. I think ever since I did a course on Data management and Analysis, I kinda thought designing software was more my thing. Sure the graphs were cool though, and I like graphs but I think too much data fiddling well just becomes too much data fiddling. That said, I did not learn machine learning and the closest I got to classification was K-nearest neighbour clustering techniques.

With machine learning, the mathematics however is quite interesting, especially the partial derivative calculations that help you determine the impact that model weights are having on the loss function of your model (backpropagation). I did have to write them out by hand initially because otherwise I just would not understand it.

After you understand this, you start to understand that parts of machine learning are very much a brute force, nudge-it-until-its-correct sort of discipline - which is effective but this is an over-simplification of course, and there are more smarts involved.

What is really quite impressive is that pytorch has a built-in Tensor type that will track how each tensor's value impacts an expression that involves that tensor - and calculating the impact of the tensor on say loss function is just a matter of calling backward() and the entire object hierarchy involved in the expression is evaluated for its impact on the expression. Quite cool. This helps not having to worry about trying to calculate the chain rule manually on a piece of paper! Also, found it pretty cool how easy it was to move Tensors to the GPU to speed up training times.

With this, I've pretty much swapped Ruby for Python which has become almost an extension of me lately (same goes for C++ but more on that later). Interestingly while designing my feature pipeline, I found that python has no concept of private members and the convention is just to use double underscore in front of the method name. Abstract classes exist which was useful, as I designed a pipeline (which is basically this) that is based on interfaces that allow uniform interaction but allowing varying underlying implementation details. 

My pipeline currently consists of 2 classifiers (SVM - Support Vector Machines and MLP - Multi-Layer Perceptron) and 2 feature extractors (SIFT and HOG) and one convolutional neural network (CNN) based on MobileNetV2.

The CNN I originally designed from scratch needed too much training than I had time to do and so the learning rate was poor. So I've been fine-tuning this one using pre-trained weights and I've just adapted it to learn the classes that I'm interested in.

I will say that I particularly enjoyed the learning around machine learning theory, for example understanding why a non-linear function (Sigmoid or ReLu for example) is used after linearly combining the input values, which is to produce a variance in the shape of the function which contributes to determining a function that best describes the input.

To this extent, this book was particularly useful in understanding 'why' and not just doing it and moving on which is so often the case with technical theory - not that this book was technical it was more practical and provided diagrams like this one - which my brain seems to appreciate. I wouldn't say I'm proficient however but I'm interested which was more than I could say before. 

Pity I don't have an NVidia graphics card so I've been having to use the GPU in google colab and I hit the limit a few times while training but eventually got 83% validation accuracy which is pretty good. 

Apart from that I've also been writing a lot of C++/OpenGL and finished a demo racing game, which I very much enjoyed programming. Its very simple but shows various important 3D graphical elements.

I've implemented an exponential fog effect and my scene is basically themed on Jurrasic park-styled atmosphere.

I've incorporated some meshes for the player car, the forest and the track. The path through the scene is calculated using catmul rom splines and the rear-view mirror is programed using a FrameBuffer object.

Most of the shader code is for the lighting effects and the fog. For the lighting, the Phong-Blinn model is used. Its been very interesting managing the vertex buffers and drawing 3D primitives etc. 

What I'd like to do next is incorporate the library of code that I developed for the demo into a more abstract utility that I can use in the next thing I do. 

In terms of Information Security, I wrote a critical review about securing software development processes as recommended by Clause 14 in ISO 27001 around the utility of implementing E-SecSDM, an engineering-focused software development model to improve the security of engineering systems that incorporate software in their design.

I think the learning I did on digital forensics, criminal law and network security previously was a bit more exciting than learning about ISO 27001/2 but like most things, its useful to know a little more than you did before so in this way, its useful.

I've been out and about running also - that knee niggle has seemed to have sorted itself out (well, I did implement a no-run policy for about 2 months) however my fitness has dropped off but that's ok - I've been slowly working my way back up. My last couple of runs were slow but they were pretty nice especially now as the sun is starting to come out. 

Speaking of which, maybe I should go for a run. now....

 

 

Game development C++ Computer Vision Computer Graphics OpenGL
Write comment (0 Comments)

More Articles ...

  1. Implementing a Vignette
  2. Fixing the thunder in my feet
  3. Sufficiently Complex
  4. Try Monad, Progress and Lockdown Rules
  5. Rails, Euclid and Generating Mazes
  6. Set Theory, Ruby and Upgrades
  7. Time shifting, CS algorithms and Game Architecture
  8. The Fourier transform, math, malware and decoupling
  9. Encryption and network protocols
  10. Protocols, Packets and Prototypes
Page 6 of 65
  • Start
  • Prev
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • Next
  • End

Topics

Running (36) Programming (34) Game development (28) Random (22) Impressions (19) holiday (19) Math (18) C++ (16) Wierd (12) Gym (11) Traveling (10) Functional programming (10) Software Engineering (10) TCP/IP (9) Networking and security (7) Investing (6) Linux kernel (6) DirectX (6) XML (5) Ruby (5)

Twitter

Tweets by @stumathews

Latest

  • Functional XML (Game Development) 19-02-2023
  • Midnight in Paris (Blog) 04-01-2023
  • Christmas Run (Running) 26-12-2022
  • So far, it works (Game Development) 25-12-2022
  • Traveling Europe (Blog) 01-11-2022
  • Applying and Evaluating Pattern-Oriented Designs In Improving Code Quality In Complex Software (Code) 01-10-2022
  • Knoydart Peninsula, Scotland (Running) 01-10-2022
  • CppGameLib (Game Development) 12-09-2022
  • Thoughts on Multiplayer Game Co-operation and Distributed Computing (Game Development) 04-07-2022
  • The fading importance of ego and the utility of the checklist (Blog) 18-04-2022

Recent

  • Functional XML
  • Midnight in Paris
  • Christmas Run
  • So far, it works
  • Current Reading

Share This

Follow Me

Login

  • Login
  • Webmail
  • Admin
  • Downloads
Bootstrap is a front-end framework of Twitter, Inc. Code licensed under MIT License. Font Awesome font licensed under SIL OFL 1.1.