October 07, 2019

Mindforth is a simulator, but not an AI

Mindforth is long running project which is marketed in different online forums and chatgroups under the keyword “AI has been solved”. Most users are irritated by the sourcecode which contains of 10k lines of code, written in the Perl language https://ai.neocities.org/perlmind.txt Other example of the Mindforth program were written in Forth and Javascript as well.

Because the amount of users who have tried to understand the details is high, Mindforth has a long history and even it's own FAQ page it is equal to a cultural phenomena which has to researched a bit in detail. The short explanation for everybody who is in hurry is, that Mindforth can't solve puzzles, but it is equal to existing puzzles like the boardgame Scrabble.

The longer explanation has to do with some definitions. At first, there is need to describe precisely what the difference is between an environment and an AI bot which acts in the environment. An environment is equal to a domain, a simulator and a game. Typical examples are the toy problem blocksworld, the mentioned Scrabble game, or a game of pacman. All these puzzles have in common that the user has to act inside the given action space. In the Scrabble game the user has to figure out which words he can put down. And he is only allowed to use the pieces on his own side. The user accepts the fixed rules because he want's to play the game and the interesting question is which kind of actions result into winning the game.

In contrast, an AI bot or a strategy used by a human player has to obey to the given rules and it allows the user to reach in the game a certain state. If decides carefully he can win and vice versa. Automating the task of decision making is researched under the term Artificial Intelligence. The idea is to program a computer program which can act in an environment autonomously.

After this short introduction we have to determine which kind of situation is available in the Mindforth project. The surprising information is, that Mindforth is not able to play existing games, but it's equal to an environment. Basically spoken, Mindforth is a game in which the player has to maximize it's reward. He can do so by entering words on the commandline. The input is parsed by the Mindforth engine and then a result is shown on the screen. To play the Mindforth game right, it's possible to enter words manually, or with a script. Mindforth will receive the input, parse the input by it's own rules and gives a feedback back to the user. The idea is, that the user enters a certain sentence to maximize the reward.

How exactly the user can maximize it's score it's unclear, because the game rules are a bit chaotic. And a variable like “score or rewards” isn't available in the mindforth software. But in general we have to assume, that the intention is not, to use mindforth as an AI which solve existing problems, but the idea is, that Mindforth is simulating a domain which is hard to solve by the user.

Does this make sense? Yes and No at the same time. Most people who are interested in Artificial Intelligence are interested in computer program who are able to play games. Because many games like TicTacToe or Scrabble are already available but the question is how to solve these games. They are disappointed if they are confronted with the fact, that Mindforth can't help them to play games. On the other hand it's an interesting problem how to create a simulation. Mindforth is according to the documentation a cognitive simulator. That is a certain kind of game which emulates psychological processes. It's important to mention, that a cognitive simulator is not solve to solve thinking games, but it's a domain specific language to create new problems.

I know the description is highly vague, so let me give an example. In a simple guess game, the user has to enter a number between 0 and 10. If the number is equal to the number imagined by the computer he has won. The sourcecode is shown here:

#!/usr/bin/env python3
import random
random.seed()
goal=random.randint(0,10)
a = input("number (0-10)? ")
if a==goal: print("you won")
print(a,goal)

This kind of sourcecode formulates a domain. The game has a inner structure, rules and asks the user to do something. If the user enters the right number, he has won the game. Creating such games is not very hard. Many formalized puzzles are available. What they have in common is, that for solving these puzzle the user has to think about the case. In case of the number guess game, the user enters maybe the number in the middle which is 5 in the hope, that this will maximize it's reward. It depends on the game, which strategy is the right one. The ability to solve existing games is equal to Artificial Intelligence.

It's important to make clear, that the listed Python sourcecode isn't equal to an Artificial Intelligence. Even the program doesn't contains a compiler error and was programmed well it's a puzzle. That means, the program provides the rules, and a potential rewards and for solving it, the user has to be intelligent or he needs some luck.

How to pass the Mindforth Turing test?

The mindforth program is available in Perl https://ai.neocities.org/perlmind.txt, Forth and Javascript. http://mind.sourceforge.net/Mind.html All the programs are operating with the same idea. They are playing a game with the user, called Turing test or captcha. The idea is, that the user has to convince the mindforth engine, that he is a human but not a machine. He can do so by entering words in the subject verb object notation which is known as a triple storage. If the user has entered the right words, Mindforth comes to the conclusion that the user behind the screen is a human.