Alan Richmond

Merlyn: Computer Control by Speech Recognition

Merlyn Computer Control by Speech

Merlyn is a Python program for computer control by speech. It uses the CMU PocketSphinx system, and is capable of supporting many tasks that you might want to do on a regular PC, using voice only. It is currently Linux only and is an alpha release for proof-of-concept. In particular, you can: play local music files open…

Eight Queens Puzzle – Six Lines

8 Queens

‘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…

A Neural Network in Python, Part 2: activation functions, bias, SGD, etc.

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,…

A Brief Introduction to Artificial Neural Networks

Error surface of a linear neuron with two input weights

This short article gives you a high-level overview of the AI technique known as artificial neural networks (ANN). The objective is to convey intuition rather than rigour, sufficient for example to understand this Python code. After reading this, you might like to follow up with the Further Reading list below. I have made heavy use…

Ramanujan’s 129th Birthday

1729

Someone on Reddit pointed out that today (Dec 22nd) is Ramanujan’s 129th birthday. One of the commenters further pointed out that 129 is the sum of the first 10 primes, and the smallest number that is the sum of three squares in four different ways (echoing Ramanujan’s comment on G.H. Hardy’s taxi number 1729 being the smallest…

Create Your Own Ubuntu-respin Linux Distro

AI Linux

Do you want to create your own customised version of Ubuntu? This article shows you how to use VirtualBox and PinguyBuilder to do that! This post is kind of a sequel to Create Your Own Debian-based Linux Distro that I posted some years ago. At that time I wanted an operating system (OS) that would be just…

Easy AI with Python 3

easy ai

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…

Solar System Scope

Solar System Scope

Online 3D simulation of the Solar System and night sky in real time – the Sun, planets, dwarf planets, comets, stars and constellations. The Model consists of 3 main Views (Heliocentric, Geocentric and Panaromatic), including: • Precise Positions of all Celestial Objects according to NASA Calculations • Schematic Distances and Sizes for better understanding of Planet…

Have we already seen this number? (deja vu again)

I had a phone interview for a Python job the other day. It started out really well, he was very impressed with my CV and called me a ‘rocket scientist’. But then we got down to the technical questions and my brain decided to go out to lunch, and (yet again) I managed to snatch defeat…

Recommended Online Courses in Computing, Science & Mathematics

These are MOOCs or Online Courses in Computing that I have taken or am in the process of taking, that I found to be particularly good in a number of ways. For me, it’s important that the presenter presents well. I’m easily distracted by verbal tics – y’know, ok, um err? And of course, the…

Hello World 2, in Python 3

hello world

Hello World is the famous minimal introductory program for many programming languages. But as soon as it’s served its purpose, it’s discarded in the dust of history for more exciting things, such as data types or expressions… This is politically incorrect discrimination and must be stopped! This loyal and true didactic program should have the right to…

Book Review: Coloring the Universe

Coloring the Universe

Coloring the Universe: An Insider’s Look at Making Spectacular Images of Space by Dr. Travis Rector, Kimberly Arcand & Megan Watzke. This is a coffee-table astronomy book with a difference: the processing behind the beautiful astronomical images we’re now so familiar with, is revealed. This book is actually very readable and enjoyable, thanks to the authors’ amenable…

Barcodes in the Stars: Stellar Spectroscopy

Fraunhofer Lines in the Sun's Spectrum

What are the Sun and Stars Made of? Scientists tell us that the stars (e.g. our Sun) are made mostly of hydrogen (72%) and some helium (26%) and a little bit of some (65) other elements such as oxygen, carbon, neon, …). Now how do they know that? It’s not like they could send a…

World Science U: Knowledge for Everyone

World Science U

Whether you are a high school student, science major in college or a lifelong learner, World Science U is where you can explore the wonders of Science guided by leading researchers an educators. World Science U provides a unique educational experience for you, with Brian Greene and other renowned professors leading the way, accompanied by…

General Puzzles

Rubik's Cube

A man who lives on the tenth floor takes the lift down to the first floor every morning and goes to work. In the evening, when he comes back; on a rainy day, or if there are other people in the lift, he goes to his floor directly. Otherwise, he goes to the seventh floor…

Logic Puzzles

By Cmglee (Own work) [CC BY-SA 3.0 (http://creativecommons.org/licenses/by-sa/3.0)], via Wikimedia Commons

Knaves and Knights An island is inhabited by two classes of people: knights, who make only true statements, and knaves, who make only false statements. Three inhabitants are conversing. Alfred says, “All of us are knaves.” Bert says, “Exactly one of us is a knight.” What are Alfred, Bert, and Charles? Answer Fork in the Road The…

Lateral Thinking Puzzles

Rodin's Thinker

Be prepared to think outside the box for these classic lateral thinking puzzles. Enjoy! Three Switches and Three Bulbs Three switches outside a windowless room are connected to three light bulbs inside the room. How can you determine which switch is connected to which bulb if you may enter the room only once? Answer Nutty Problem…

Disturbed – The Sound of Silence

This post has nothing to do with computers, science, or space, but here is something so good I felt I should share it with you anyway! Its Disturbed’s cover of The Sound of Silence (1964) by Simon & Garfunkel. Not since my college days in London (1969 – 1972) have I heard music that I simply…

Does ‘Almost Infinite’ Mean Anything, Really?

Infinity

It’s a common enough phrase, and I think most of us have no trouble understanding that the speaker or writer is referring to a quantity of something that is mind-bogglingly huge. Infinity is a slippery concept; you may suppose that you understand its essential quality of being really big – like space, but then erroneous…

A Basic Introduction to HTML

HyperText Markup Language

HyperText Markup Language (HTML) is the main markup language for creating web pages and other information that can be displayed in a web browser. HTML is written in the form of HTML elements consisting of tags enclosed in angle brackets (like <html>), within the web page content. HTML tags most commonly come in pairs like <h1> (opening tag) and </h1> (closing tag), although some tags, known as empty elements, are unpaired, for example <img>. The…

Web Publishing with WordPress

WordPress

WordPress is a free and open-source tool and a content management system (CMS) based on PHP and MySQL. Features include a plugin architecture and a template system. WordPress was used by more than 23.3% of the top 10 million websites as of January 2015. WordPress is the most popular blogging system in use on the Web, at more than…

Number guessing game

The number guessing game incorporates several simple but important elements of elementary programming and is a good candidate for an introductory programming example. If you’ve seen any programming course, you’ve probably seen the “Hello World” program. In Python it’s: print (“Hello World”)This is done to get the student(s) quickly to the point of having successfully installed…