Showing posts with label Logic. Show all posts
Showing posts with label Logic. Show all posts

Saturday, November 16, 2024

Excel Simple Sudoku Solver

There are many different ways to solve a Sudoku puzzle with a computer. A previous post explained how to solve Sudoku puzzles with pencil marks and solving techniques (as a human would do), and also using brute force with or without backtracking, something only a computer can do. However, that was all too advanced and created some confusion among readers. In this post, we take a step back and use a very basic solving algorithm, which is probably the simplest way to solve a Sudoku puzzle with a computer. The algorithm applies basic logic to find unique occurrences for each puzzle gap. This will only solve Sudoku puzzles of low and medium difficulty though (maybe some difficult too).


Friday, October 14, 2022

Excel Nonogram Maker and Player

Do you like logic games? In this post we see how to create nonograms in Excel using VBA macros. The macros described here and the file attached allow to create custom nonograms or generate random puzzles, and then save them to another (hidden) sheet. A different tab allows to play existing (saved) nonograms or randomly generated puzzles. The nonogram player checks the progress and allows to confirm the result or display the solution. We can also change the size of the nonogram puzzles to reach different levels of difficulty. Continue reading this post to learn how the program works and download the file to play nonograms in Excel.


Saturday, January 15, 2022

Excel Four in a Row

In a previous post we have seen how to create the Tic Tac Toe game in Excel using VBA macros. In this post, we will leverage that VBA project to create the Four in a Row game in Excel. The logic and algorithms are more challenging though, as there are many more combinations in the Four in a Row grid. Check out this article and download the file to play Four in a Row in Excel.

Tuesday, December 14, 2021

Excel Game of Life

In this post we see how to create the Game of Life in Excel using VBA macros. The universe of the game of life is a 2D grid of cells that can either be dead or alive. The Excel worksheet is therefore the ideal layout to create the game. We will use VBA loops and arrays to apply the rules of the game and evolve the initial configuration.

Saturday, December 4, 2021

Excel Maze Generator

Let's see how to leverage a classic algorithm to create a maze in Excel using VBA macros. The method used to generate the maze follows the randomized depth-first search algorithm. The maze caving process in this version of Excel Maze Generator is visual and can be followed directly on the worksheet, in order to help readers better understand how the algorithm works.

 

Wednesday, November 24, 2021

Excel Tic Tac Toe

Classic game! In this post we see how to create the Tic Tac Toe game in Excel using VBA macros. Despite its simplicity, Excel Tic Tac Toe is a good example to understand logic and algorithms as the basis of AI behind computer's moves. Play Excel Tic Tac Toe and try to beat the machine!


Wednesday, February 19, 2020

Excel Minesweeper

In this post we learn to make the famous Minesweeper game in Excel. It is an excellent opportunity for VBA beginners to understand FOR and DO loops, and IF/ELSEIF/ELSE conditions, as well as some new VBA Events. There is a more complicated logic to open the cells though. Excel Minesweeper is fun and quite similar to the original Microsoft game.

Popular Posts