How to implement Logistic Regression with NumPy

Sharpen your NumPy skills while learning Logistic Regression What’s our plan for implementing Logistic Regression in NumPy? Let’s first think of the underlying math that we want to use. There are many ways to define a loss function and then find the optimal parameters for it, among them, here we Read more…

Understanding Logistic Regression

The math of this method explained in detail What is logistic regression? Logistic regression is just adapting linear regression to a special case where you can have only 2 outputs: 0 or 1. And this thing is most commonly applied to classification problems where 0 and 1 represent two different Read more…

Playing 2048 with Minimax Part 3: How to control the game board of 2048

…and finish implementing the minimax algorithm In this article, we will finish implementing the minimax algorithm for playing the 2048 game, and then we will use this implementation to automatically play a web version of this game which can be found on this Github page. Here is the previous article about Read more…

Playing 2048 with Minimax Part 2: How to represent the game state of 2048

And how to do it in an object-oriented fashion In the last article about solving this game, I have shown at a conceptual level how the minimax algorithm can be applied to solving the 2048 game. But to put those ideas into practice, we need a way of representing the Read more…

Playing 2048 with Minimax Part 1: How to apply Minimax to 2048

2048 — a simple game, but programming a computer to solve it it’s not trivial Minimax is an algorithm designated for playing adversarial games, that is games that involve an adversary. In this article, we’ll see how we can apply the minimax algorithm to solve the 2048 game. This is Read more…