ChiPy Mentorship Program Blog Post #2

My project

I used to play Grand Theft Auto II & III with my dad on the PS1 (remember those?). The content wasn’t always kid-friendly, so he and I would sneak off and play when my mom was out of the house (shhhh). My dad died shortly thereafter, so that game has always had a soft place in my cold, Russian heart. It seemed only logical to use the beloved game for my driving project.

I paid $60 for GTA V just to realize it doesn’t run on Mac. The older ones did! Ooops. Good thing my partner has a Windows desktop that I am able to use. After the massive download, I was anxious to get started. The game is loading! Initial cutscene! First mission! The first objective was to follow a buddy and drop off a car.

Graphics have improved over the years, my skills haven’t

After completing a couple of missions, it was time for me to explore the map, drive around, and try out some OpenCV.

It would be so easy to copy-paste code from plenty of online sources to make it all work, but I want to walk away from this project feeling like I understand it and can explain it in all its entirety. I started using some OpenCV, and it is magic. It is difficult to work with sometimes, so eventually I would love to write blog posts on basic projects people can do to explore OpenCV. The documentation has been surprisingly approachable despite its technicality, though. The first time I got edge detection to work felt incredible.

I am a god

I managed to get hough line transform to work for lane detection, now it is time to collect data and program an agent. I am currently learning about programming the car, and I can’t wait to share results with you next blog post!

For the mentorship program deadline, my main project is to create a self-driving car in GTA while learning about neural networks and reinforcement learning. I am so excited to learn about Tensorflow. I have gotten some kind of a twisted pleasure working with regression and classification, and those are just the beginner basics of machine learning.

Outside of this GTA project I want to use what I learned to program a Raspberry Pi to do several tasks like be a self-driving car, have facial recognition, and possibly use that facial recognition to sneak up to and attack my partner with darts — all for the sake of learning, of course. It would also be cool to eventually train two separate agents in different ways, and see how they interact on a track or on a battlefield. While that might not be in the scope of this mentorship project, I am already excited to find a different application for what I have learned.

Next steps

  • Work on Python exercises daily
  • Learn more about neural networks and Tensorflow
  • Finish a self-driving car in GTA V
  • Go to PyCon!
  • Get the new Raspberry Pi (3B+ came out yesterday for Pi day! Surprise!) and make a self-driving car

Lessons learned

I dun goofed, a bit.

At this point of the journey, if I could do it all over again I would focus on vanilla Python before exploring what all these amazing libraries have to offer. My introduction to Python has been through some DataCamp courses, and while it is a great program, it relies heavily on libraries. I didn’t even know how to read a csv without Pandas! I knew how to work a Jupyter notebook like a champ, but when it came to working on a larger project with actual structure, README and requirements files, using Git, importing other .py files, etc., I had no idea what I was doing.

I definitely had to take a step back and learn to love and use the language in its pure form. I slowed down a great deal, and am working on filling in some of the missing pieces. I am only 10% sorry for rushing into things — I was excited, and that excitement was a huge part in powering through the frustrations that came along with learning something new and the process of getting set up. Now that blast of excitement turned into something more relaxed and sustainable, and I am finding myself more settled and comfortable both with the language and myself as a newbie programmer.

Take it easy! Do as I say, not as I do.

Having that in mind, I am trying to tackle algorithms in a write-it-out brute-force way. While working on a Jupyter notebook for logistic regression, I made sure to take it step by step and utilize the actual equations. I have definitely learned my lesson in using a tool vs. understanding the core concepts. Breaking it down has really helped with both comprehension of the topic and the big picture.

My mentor Zax has shared some resources with me that have been very helpful-

  • Here is Zax’s Python Learning Guide
  • This edX course for an introduction to computer science and programming using Python
  • CodeFights has been a great tool for making me think outside of the box, and has plenty of programming interview practice questions, try it out!
  • If you haven’t used PyCharm, try it also! There was definitely a hell of a learning curve, but I am now in love with it. I still default to Jupyter notebooks for anything not project-related and easy, but PyCharm has been a charm, heh (sorry, not sorry!).