Skip to main content

How I Understood The Importance of Machine Learning?


I was fascinated with technology ever since I can remember. I was curious and knowing something gives me happiness. After 19 years, I didn't lose that interest. I am now a Computer Science student in second year of B.Tech programme. Unlike other students, I always wanted to do something that differentiates me from the rest. I decided to build applications. In my first semester, I did three, two in the next semester and only one in my third semester. All but the last one were nothing but small games. The last one is a Tic Tac Toe.

Tic Tac Toe, popularly knows as Noughts and Crosses. The game is played by two players where one of them takes X and other O. The winner is the player who forms three of their symbol consecutively. The speciality of the game is that, if both the players are careful, none can win. There were already games like these and even this one developed by many people. But, I wanted to build one myself, especially where the second player is played by the program itself.

I choose Java to build it because it had GUI tools that we have just learnt. It took me about four to five hours to write the logic. I did it with certain motives in mind. To check if the program can win, to defend, to make a move which lays the foundation for next move, to predict and stop the player's move. Finally, with the GUI, I built an application that had buttons and windows to display appropriate messages.

It was about 7 PM when I gave this to my father and challenged him to win against it. He played and it was a draw. Then he played again and he won. Then, I asked to play the same way again. He did and he won. I noted the steps, opened the IDE and changed the source code to defend itself. Now I asked my father play again. Despite multiple attempts, he either lost or made a draw but never won.

Overwhelmed with happiness, I challenged my sister to play against it. She did and won. It took me some time to write the code and these people were winning against it like nothing. Then I found out that the bug I covered up to defend my father's play has opened another bug which was not there earlier. Wth all the happiness gone, I took back my laptop and went into my room. Opened the source code and started debugging. After about ten minutes, I was found a patch to both those bugs. Then I took it my sister, she either lost of made a draw but never won.

I, myself tried other inputs and did not win the game. I pushed it to my Github repository hoping to show all my friends the next day. I never liked to do the lab programs in the lab. I always used to finish it before and have fun in the lab while I see my friends stuck somewhere while doing it. So came the next day and the Java Lab.

As usual, I opened my Google Drive, downloaded my programs that I did three weeks ago on a holiday when my friends were watching 'Jai Lava Kusa' and 'Spyder'. It was running perfectly and I put it aside. The atmosphere in the lab eased and I pulled the source code from my Github repository and ran it. 

Pranav was the first one to try it. To my bad luck, he won. I realised I prioritised the wrong outcomes. Made changes and got over his play. Harsha played next and he didn't crack it. Next was Vidya. She came in like a typical nine pointer and won. Fish, I had to change my code again. Now it was good enough. I tried to play against Google's 'Impossible' level and it was always a draw. Several other people played it and were amused to see themselves lose. 

I learnt that automating something isn't as difficult as I thought it was. It was much challenging. After all, a game of tic tac toe required all these testing and debugging. Also, after each of them played, I learnt a new method to trick the other player, which was the program in this place. So, what if, I wrote a program which learns from the game by considering the player's inputs and plays the next game smarter. Like it might lose a game with someone, but when those same inputs are entered again, it should be able to counteract. Like there was certain intelligence in the program.

Like I told you, I am curious all the time and I can google something very appropriately. I did it. I found about Machine Learning and Deep Learning. I read about them. I understood them better than before because now I know why it is used for. Suppose, it was a game of chess. Maybe, I could be changing the code for my entire life and still lose or write that intelligent program, train it on data and let it win.

I never quite understood Machine Learning properly. I thought maybe it was above my level of understanding or someone needs to teach me. But then, it all goes by the saying, "Experience is the best teacher".

If you are interested, check out the source code at my github repository.

Comments

Popular posts from this blog

Tic Tac Amazon

Getting into any department of Amazon can be quite challenging, especially after considering the company's reputation and the competition it has for any role. When the drive happens on campus, the competition would be very limited since all the applicants are the students of the same batch. I'm someone who isn't that great at listening to classes or getting marks. The role offered, requires us to have a good knowledge and understanding of Operating Systems, Computer Networks and Programming. So, how did I crack it? Projects, Mission R&D and proper presentation. Though we have a lot of online tools that would design the resume with appropriate styles, I prefer doing it myself using the word document editor. The centre of attraction on my resume is the projects column cause it is the biggest one with eleven projects on it. No matter whatever role I'm being interviewed for, I've always been asked questions like "How did you find time to do all ...

My Story from Physics to Programming

I remember, when I was in school, my interest was in Physics. Many of my friends during intermediate suggested that I take Mechanical Engineering while my father who knew me well told me that I take Electrical and Electronics Engineering. There were days where I considered Aeronautical Engineering too. But I hated programming. I was first introduced to it in my ninth grade and I never understood the importance of it. We memorised the Java programs and put it on the paper in exams.    Today I'm a Computer Science and Engineering Student and I choose this branch on my own will. It was in seventh grade that I started liking physics. Earlier, I was interested in science because it seemed logical. One day in seventh grade, I started answering the problems in the class without knowing any formulas or proper definitions to understand them. It was kinematics. It was then that I understood that physics is not some formula-subsitute subject, it requires understand and imagi...

The Evening Walk

I am someone who is comfortable with myself. I'm pretty habituated to doing things myself except for few. I love walking, when it is not in a hurry. So, one evening when I was in Intermediate, my college got over at 5 PM when it was supposed to be at 8 PM. Instead of going home, I wanted to explore the downtown's roads and get to know it. I love observing things and observing these rich people's lifestyle didn't seem any different. I borrowed earphones from my friend, set my playlist, tightened my backpack and started the trek in the city. I never went across the VIP road. There seemed to be a big apartment coming up and it was in its construction phase. I had loads of time so I took the long route. Walked south by two blocks and turned east. Crossed the road and entered into the colony. Most of the houses were individual houses that would cost crores as of now. I kind off liked it when I saw this million dollar house with a Maruthi 800 car. My dad i...