Introduction:

I would like to credit Onel Harrison for his explanation on KNN and the following explanation is from his article which I would recommend you to read if you want an in-depth explanation of KNN:

The k-nearest neighbors (KNN) algorithm is a simple, easy-to-implement supervised machine learning algorithm that can be used to solve both classification and regression problems

An example of the game


Introduction:

This code is an extension of Edwins original Monte Carlo Code which improves on the heuristic function and also adds a brute force function onto the code so that it improves the codes time efficiency.

This was a project undergone inn a group of people which were me and a person called Edwin. While I was responsible for the Highest Score code, Edwin was responsible for the Monte Carlo code and since they are both distinct, I believed that they both deserved their own article. Both have their advantages and disadvantages and in the application of a real AI…


Introduction:

All of the Monte Carlo code is solely written by a friend at my school called Edwin. This was a joint project but the AI aspect is completely done by him.

This was a project undergone inn a group of people which were me and a person called Edwin. While I was responsible for the Highest Score code, Edwin was responsible for the Monte Carlo code and since they are both distinct, I believed that they both deserved their own article. Both have their advantages and disadvantages and in the application of a real AI, the Monte Carlo method…


Introduction:

This was a project undergone in a group of people which were me and a person called Edwin. While I was responsible for the Highest Score code, Edwin was responsible for the Monte Carlo code and since they are both distinct, I believed that they both deserved their own article. Both have their advantages and disadvantages and in the application of a real AI, the Monte Carlo method would be the only viable option because the Highest Score has a cheaty nature in that it can decide the best board out of an option of many boards. …


This is 2048

This is going to be a sequence of posts of the process of creating a AI to run the game 2048. This first post is running 2048 on the terminal, the next will be visualising it and then finally the last post will be the fully implemented AI which will use minimax to choose the best possibility. This project has been done by me and a school friend called Edwin as a joint effort and I accredit him for helping me a lot with making the code as efficient as possibility. …


Over the last two days I have spent a few hours programming a simply checkers onto python. Overall, the project has definitely taught me many lessons about organising my variables and also the use of decorators although none of them got into the final code of the application. If anyone is trying to make the application themselves, I would recommend you take the grid code and then try implement the code yourself. In order to improve the efficiency of your code, I would also recommend you to not have a separate 2d array in order to conduct all of your…


I havent posted an article in a long time because of schoolwork so I thought I would free 2 hours today to quickly program snake and upload it. This is the result. Since my last post, I have been making progress on a course in web development where I’ve been learning HTML, CSS, JS and node.js where I have learnt how to run a proper server with endpoints and have a mongoose server attached onto it so expect future articles on web development. Furthermore, I am doing a free CourseEra machine learning course on CourseEra which has been very useful…


Rising popularity in technology over the last decade has seen massive growth in all things related to computer science. This has given birth to many sub-branches such as data science, SaaS (software as a service) and also machine learning (AI). As a result, data is being extracted on us constantly, and possibly, more data than you are aware of: did you know apps have full access to your camera and microphone (even when you aren’t aware of it being on)? Apps use it to track your eyes and to overhear your conversations- a snooping method of data extraction. Most people…


This is my very condensed guide on how to start your exercise journey. It isn’t going to be easy but if it was easy everyone would have chiselled 6 packs and could deadlift 500kg but that isn’t the case. This is going to push you out of your comfort zone but if you have the consistency I assure you that you will see amazing results.

Why I believe I have the right to talk about this: I had been overweight and near obese my entire life. By year 5 I was somewhere between 70–80kg and it had a really bad…


If you don’t know, the game of life is a simulation for population.

The wikipedia page explains the very basic rules of the Game of Life and how you decide the states of a tile.

This video also gives a visual explanation if you’re a visual learner.

Rules:

A living state is black and a dead state is white. We

  1. Any live cell with fewer than two live neighbours dies, as if by underpopulation.
  2. Any live cell with two or three live neighbours lives on to the next generation.
  3. Any live cell with more than three live neighbours dies, as…

PasiduPerera

Prospective Computer Science Student

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store