New project time
Starting a new project can be daunting and completing is even more difficult. To try and keep myself on track and leave some stopping points I’ve written down a plan so that hopefully I can actually ‘complete’ something.
I’ve been craving some low level programming and also another machine learning project. It has been some time since I’ve done much with machine learning and the thing is you need something for it to learn from.
Part 1
Create a something the first thing that came to mind was a game. I’ve had success previously with a flappy bird clone using P5 JS and applying the genetic algorithm. This time I’d like to make something that runs in a terminal that could relatively easily have the game state sent over a socket connection.
I landed on a ‘runner’ type game the kind where you have a character who appears to be moving forward dodging obstacles by moving left and right. We’re working in 2D so no jumping.
Learning this part was interesting I started with raw output from c directly to the window using printf however that made the character unable to move while the screen was drawing. Enter ncurses. You can accept input while drawing with ncurses, so after switching all the drawing code around I turned to randomizing the object generation. I’m keeping this super simple for now the board is 8 characters wide, level one has one obstacle randomly placed in a row, level two has two and so on.
This part is done I’ve got a working little game, it keeps score tracks levels randomly generates obstacles and ends the game when you hit one.
Part 2
That was fun but for me the game isn’t the part I’m most interested in. I’m going to design a server/client architecture.
The client will be responsible for displaying the game state and passing player input to the server. I’m no frontend dev but I imagine a world where this client is running in a browser or something with fancy graphic and the like but I’ll probably keep it in a terminal printed with ncurses I do see the potential though.
The server will be responsible for actually running the game and tracking state and receiving the player input from a client. My goals for the server are it should be eventually able to handle many clients at once.
Part 3
Machine Learning. - Genetic algorithm I’ve done this approach before but if the server can run many connections I think this may be a good comparison to other types of learning algorithms
- Reinforcement learning I want to explore using Tensorflow for this. I may start off by adapting a handrolled Neural Network library but I have done this before so pretty soon I want to learn to use Tensorflow as to my knowledge it’s widely used in the industry.
Conclude
So that’s my project plan. I’ve completed part 1 and I have logical stopping points to pick up and put down this project at that I think will be satisfying with sense of accomplishment at each point with lots of opportunities to grow professionally through practical experience with machine learning and distributed systems. Each phase of the project introduces new technical challenges that will help develop my skills in different areas of software engineering.
If you are interested the code is over on my github
Tags: tech