7th March 2017

‘Eight Queens Puzzle’ is a classic chess puzzle, where you are challenged to place 8 queens, of the same colour, onto a chess board, such that no queen attacks any other queen. So, none of them may share a row, column, or diagonal with any other. In a previous post, I introduced Raymond Hettinger’s ‘Easy AI with […]

9th February 2017

This is Part 2 of A Neural Network in Python, which was a very simple neural network to learn the XOR function. This part builds on that example to demonstrate more activation functions, learning a simple math function, adding a bias, improvements to the initial random weights, stochastic gradient descent, mean square error loss function, […]

31st January 2017

In this article, I’ll show you a toy example to learn the XOR logical function. My objective is to make it as easy as possible for you to to see how the basic ideas work, and to provide a basis from which you can experiment further. In real applications, you would not write these programs from scratch […]

19th May 2016

Survey several basic AI techniques implemented with short, open-source Python code recipes. Appropriate for educators and programmers who want to experiment with AI and apply the recipes to their own problem domains. For each technique, learn the basic operating principle, discuss an approach using Python, and review a worked out-example. We’ll cover database mining using […]

27th May 2015

Most Mandelbrot Set programs proceed along the display area, pixel by pixel horizontally, row by row from top to bottom. This one doesn’t. It divides up the screen into 6 horizontal squares in 2 rows, then for each one, checks the value of the escape time for the pixel at each corner. If they’re all the […]