Other articles

  1. Understanding the Path-Union algorithm

    In the following article we will take the time to understand the Path-Union algorithm which was first proposed by Sainyam Galhotra, Akhil Arora and Shourya Roy in Holistic Influence Maximization: Combining Scalability and Efficiency with Opinion-Aware Models.

    This algorithm is discussed in section 3.2.1. To understand the PU …

    read more
  2. Building a Minesweeper Game - Getting Started

    The following Python game will be built using pygame.

    Installing Pygame

    To install Pygame follow the following instruction: https://www.pygame.org/wiki/GettingStarted

    This should be relatively easy.

    Building the grid interface

    To better manage the entire game we will code a Game class which will hold the main …

    read more
  3. Building a Minesweeper Game - Introduction

    The minesweeper game is a simple and fun game to play alone.

    The following posts will be like so: 1. Getting started: * Installing pygame * Building the grid interface * Managing events
    2. Preparing the grid: * Placing the mines * Numbering the cells 3. Coding game basics
    * Placing the mines after the first …

    read more
  4. Building a Minesweeper Game - Preparing the grid

    Placing the mines

    As we have seen in the post "Minesweeper - Placing the mines - A statistical analysis".

    The fastest way to place the mines is using the random sample function:

    def randomSamplePlacement(board, mines):
          Use random.sample() to place mines
        rows = int(board.shape[0])
        columns = int(board.shape[1 …
    read more