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

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

Edu'Nation

Lets make biriyani now. Put all the ingredients into a cooker and lit the stove. Minutes later you will open your cooker and find something that is not biriyani. Why? because there is a procedure and timing that we are supposed to follow and we didn't. The same with the student. Put all the students together into a class and start the lecture. Minutes later we notice half the class sleeping. Did we ever ask ourself why even the most brilliant students in the class fail to pay attention most of the times? As students we know what we understand and not. As teachers they know what to teach. When these two are connected, the result is very good. When not, we get the Indian Education System. " Most trends are positive, but my biggest disappointment when it comes to India is the education system. It should be far better. I don't want to be critical, but I do want to create higher expectations about it." - Bill Gates When we look into the secondary school level ed

How I Used Facebook for Assignments?

Ever since I got into second year, I started submitting my assignments on time. It isn't just that but I was able to complete almost all of them well in advance. I hate assignments, unless they aren't the ones where we copy stuff from one book to another. I don't write them. But, how do I get it done? "If you are good at something, never do it for free" - The Joker. Everyone is born with some talent. Its upto you to strengthen and utilise it. Facebook is something that is used by almost everyone reading this. We all use it to make friends, share pictures and lately tag our friends into every irrelevant meme. Facebook helps you to connect with different people out there. I decided to use it to connect to different people who are interested in writing my assignments. In return I do their coding work. I am utilising my skill to do something I love. No student likes all the subjects and no student likes to write assignments. Sometimes, we might like