"The question of whether computers can think is like the question of whether submarines can swim"
Edsger W. Dijkstra
This chapter summarises many of the arguments contained in The Book (see above) and describes the philosophy behind MOPEKS® and its internal workings.
By clicking on the link above, (see 'Downloads --> MOPEKS') you can download the latest fully functioning version of MOPEKS without any kind of charge, registration or tricks. You do not need a credit card. Just click on the link, install it and run it for as long as you like. It is "freeware" in the real sense of the word. It is not an attempt to make money, it is an attempt to demonstrate what I believe to be a new approach to Artificial Intelligence.
MOPEKS® is a Registered Trademark and stands for Methods, Objects, Properties, Environments, Kinetics and Simulation. The blue logo is also a Registered Trademark. Certain aspects of MOPEKS are the subject of patent applications in all of the major countries in the world.
Private Individuals and non-commercial organisations are welcome to use MOPEKS freely and develop the ideas, if they prove of interest. Commercial organisations need to be aware that I have the means, determination and experience to defend my interests. To quote the Wright brothers 'we did not do this to make money but if anybody is going to make money, it should be us'
This project began in 1986 when I read the classic book by Douglas Hofstadter, Gödel, Escher, Bach: An Eternal Golden Braid. This started a 27 year obsession with the nature of intelligence and whether it would be possible to firstly understand how human intelligence works and secondly build a computer program that showed a possible route to a Silicon Based Intelligent Entity (SBIE).
This website, the program MOPEKS and The Book are the result.
I have read many books which purport to explain how the human brain works but invariably they seem to boil down to a description of what it does, which is not quite the same thing. There are no circuit diagrams or logic flowcharts showing how you could start to build one. They are descriptions of the classic blackbox - we don't know what is inside or how it works but this is how it behaves.
It is my belief that there is no magic or mystery here - it is a meat computer that takes input, evaluates it and then updates its memory and makes intelligent decisions when required. For many centuries the debate was complicated by the nature of the human soul but that is no longer something that concerns the majority of people who are looking at this problem.
Some of the modern stumbling blocks are such things as consciousness, the qualia and the nature of comprehension. These are all fascinating subjects but in my opinion are irrelevant. This is an engineering problem - all we want is a computer program that emulates human intelligence. Whether it is really conscious or really intelligent as opposed to "pretending" to be need not concern us. What matters is whether it can get a job in a call centre selling double glazing.
Of course, the biggest stumbling block of all seems to be that nobody appears to know how it works. But it is a machine and as such must operate on logical principles.
I have tackled the problem by trying to understand how it must have evolved. Evolution is the driving force and the first creatures to exhibit the ability to respond to events may well have been quite simple. Subsequent versions will have shown steady improvement with the occasional great leap forward.
The evolution of human designed computers has gone through the following phases:
Phase 1 - mechanical analog computers. The simplest example being the slide rule. Actually, it is arguable that an ordinary measuring rod is an analog computer but that is really just semantics.
Phase 2 - purely mechanical digital computing devices, of which Babbage's Difference Engine No.2 is the most celebrated example. This was designed specifically to carry out simple mathematical calculations.
Phase 3 - electrical analog computing devices such as gun-fire control systems on battleships.
Phase 4 - electro-mechanical digital computing devices which can only solve a particular problem, eg 'Bombes' used to decode secret messages at Bletchley Park. In order to carry out a different task you need to take out your tool kit and start moving things around physically.
Phase 5 - programmable digital computers like your PC. These can in principle solve any problem for which a logical route can be specified. To do so they require a specific program written by a human programmer. This program is then run on the computer and carries out a particular task which may be general in the sense that it can cope with a variety of different types of input but invariably of a particular class of problem.
It is never necessary for the user of the program to modify the hardware.
Phase 6 - a computer program that can write useful computer programs with a minimum of instruction - this is the "Holy Grail of Computing" which will make millions of human computer programmers redundant.
The "Holy Grail of Artificial Intelligence" is a computer program that passes the Turing test and is therefore considered to be genuinely intelligent.
It is arguable that both of these goals amount to the same thing in practice. You send it an email asking it to write a program which could play online poker, say. It would then ask you a few general kinds of questions and then in a few days (or hours or even minutes) send back the program and a set of operating instructions.
I believe that MOPEKS represents a start on Phase 6 insofar as its output is computer programs which can use each other in an ever-ascending evolutionary ascent to solve real life problems.
MOPEKS uses the principle of Genetic Programming (see 'FAQ --> General --> Q1' to generate simple computer programs. There is nothing especially innovative about this - GP has been around for about 30 years.
Where I believe MOPEKS is genuinely innovative is that it is able to take this process much further. Each useful program that is generated can be placed in a library and used in turn to create other computer programs.
MOPEKS also allows the user to construct arbitrary Environments in which a number of arbitrary Objects can operate. These Objects also have arbitrary Properties which can be decided by the user. For example, the environment might be a table top on which various objects compete for space. These computer programs (called "Methods") can also be attached to objects to enable one of the objects to solve a specific problem.
For example:
One of the objects in the solar system may be a space ship and the problem is to reach another planet by using the sling-shot gravitational effect
or
There may be a man out on the veldt pursued by a dangerous animal and his objective is to kill it
or
A man may need to visit a number of cities with the minimum amount of travelling (the "Travelling Salesman" problem)
In principle, therefore, MOPEKS is a general purpose problem solver modelled on human intelligence.The parts of MOPEKS which are not time critical are written in Visual Basic 6. The time critical parts are written in a mixture of Visual C++ 6 and Assembler. Most of the bit manipulation is also carried out in Assembler.
I am aware that Visual Basic 6 is now obsolete but when I started this quest it had not even been released. Much of the early work was written in QB4.5 and Quick C. In due course it may be appropriate to change over to .net
Ironically for a program that generates Objects, Methods and Properties, MOPEKS has not been coded as an Object Oriented Program.
Every aspect of MOPEKS was conceived and written by me personally and no other parties were involved in this venture. Having said that, I have received a lot of assistance from the usual sources on the technical aspects of programming. For example, if I needed to know how to generate pseudo random numbers or access the Microsoft Cryptography Key I would look on the web or ask on a forum. All computer programs contain components written by others and MOPEKS is no exception. Thank you everybody.
It may be that at some stage the source code will be released as "open source" (but not yet) in which case other people may wish to port the code to .net and make it object oriented.
The program naturally breaks down into a number of sections which have been named after the areas of a commercial organisation, namely Stores, Workshop, Factory-Simulator, Quality Control, Darkroom, Laboratory, Library, Line Library and Office. Like all analogies, this is merely illustrative of the functions which can be carried out in the separate sections and is for ease of reference only.
The role of these various sections is explained at greater length here in due course.
In Object Oriented Programming ('OOP') a Method is something that carries out a series of actions. In a language such as Visual Basic it would be called a function or a subroutine.
In MOPEKS, I have used the term 'Method' to describe a computer program which is derived from raw data by the 'Factory' and the 'Simulator'. The derived Method should then be able to reproduce all (or the relevant part) of that data and also reproduce the actions of whatever produced that data.
So, for example, if the data represents the distance between two particular objects in a series of trials, then the derived Method should always be able to compute the distance between any two objects.
Similarly, a Method derived from data showing the progress of an object as it pursues another object, should be able to predict the position of any object which is pursuing another object.
You can view such a Method as a generalised explanation of an observed phenomenon.
Q. 'Can you understand why the sun rises in the east and sets in the west?'
A. 'Here is a derived Method that reproduces that behaviour'
Q. 'What is this series of numbers?'
A. 'Here is a derived Method that reproduces each number and the rest of the series too'
Such derived Methods are at the heart of MOPEKS. Here is a Method generated by MOPEKS that finds the square root of a number:
Private Function SquareRoots(ByVal R As Double) As Double
'Problem Description: '01 Square Roots'
'Generated by MOPEKS at 1.01 pm on Friday 12th April 2013
Dim ax As Double, bx As Double, cx As Double, dx As Double
1: ax = R + 1
2: bx = R / ax
3: ax = bx + ax
4: ax = ax / 2
5: If bx < R / ax Then GoTo 2
'Return
Out: SquareRoots = ax
End Function
A line of a Method generated by MOPEKS consists of 11 separate instructions (see FAQ ⇨ Methods ⇨ Q4) which are all stored in a 64-bit word which is just a container (ie it is used as a storage area).
Not all of these Instructions will be used (or even visible) in any one line of a Method but they are all available in principle and can be expressed in terms easily understood by a human programmer.
MOPEKS allows you to view a Method either in a Visual Basic based language or a C based language. I have called these two alternatives 'MOPEKS Basic' and 'MOPEKS C'.
The following example in 'Mopeks C' is very similar to the Method shown above (derived on Friday 12th April 2013) but different, as you would expect. Each of these Methods took about ten minutes to generate on my very old laptop:
double _stdcall SquareRoots(double R){
// Problem Description: '01 Square Roots'
// Generated by MOPEKS at 11.55 pm on Saturday 13th April 2013
// Initialise variables at zero
double ax = 0;
double bx = 0;
double cx = 0;
double dx = 0;
Line1: ax = R + 3;
Line2: cx = R / ax;
Line3: ax = ax + cx;
Line4: ax = ax / 2;
Line5: if(ax < R / cx)goto line2;
out: return ax;
}
As mentioned above, all Methods are actually held in MOPEKS as 64 bit words (I have used 'currency' but any 64 bit word would do - it is just a storage area). The particular Method found above consists of five 64 bit words as follows:
0000000000000000000100000000011000000000000000000000000000000000
0000010000000001100100000000000000000000000000000000000000000000
0000000000000000000001000000000000000000000000000000000000000000
0000000000000001100000000000011100000000000000000000000000000000
0100010000000001100100000000000000000000001000000000000000000000
Here is the same Method in hexadecimal:
&H335A1336E5058200
&H27B592E83D280DB1
&H0010040000000020
&HA19B80F70066BDF3
&H5515F0C83E292DB5
You can swap between these formats and analyse them in detail by using the Laboratory (see Guide ⇨ Laboratory)
This Method is simple enough but if we want to know the distance between two objects operating in an environment, this is going to be more complicated. MOPEKS has generated the following Method to do this:
Private Function DistBtwn2Objcts(ByVal R As Long, ByVal S As Long) As Double
Dim ax As Double, bx As Double, cx As Double, dx As Double
1: bx = R.Xaxis - S.Xaxis
2: bx = bx * bx
3: ax = R.Yaxis - S.Yaxis
4: ax = ax * ax
5: ax = ax + bx
6: ax = SquareRoot(ax)
'Return
Out: DistBtwn2Objcts = ax
End Function
This is more complicated and uses the SquareRoot function found earlier. It also uses the properties of objects - the term 'S.Xaxis' refers, as you would expect, to the position on the X axis of object S. Here is a Class 22 Method that enables object R to go into an anti clockwise tangent around object S:
Private Function R_Tngnts_S_AntC(ByVal R As Long, ByVal S As Long)
Dim ax As Double, bx As Double, cx As Double, dx As Double
1: bx = AnglSbtnddBy2Ob(S, R)
2: dx = DistBtwn2Objcts(R, S)
3: cx = R.Radius + S.Radius
4: cx = cx / dx
5: cx = ASin(cx)
6: bx = bx + cx
7: dx = Return90()
8: bx = bx + dx
9: ax = Cos(bx)
10: ax = R.Speed * ax
11: ax = ax + R.XAxis
12: ax ==> NextStep(R.XAxis)
13: ax = Sin(bx)
14: ax = R.Speed * ax
15: ax = R.YAxis - ax
16: ax ==> NextStep(R.YAxis)
End Function
You will see that this contains references to quite a number of other Methods, all generated by MOPEKS. The instruction 'ax ==> NextStep(R.YAxis)' transfers the value of ax to R.YAxis.
It must be emphasised that MOPEKS actually uses the Methods it has generated. It runs them in an interpreter written in a mixture of C and Assembler. It does not run the Method as a Visual Basic or C program - that is purely for ease of comprehension by human beings.
There is no reason in principle why MOPEKS cannot go on generating Methods of ever increasing complexity to solve problems which in turn become more complex. The current version of MOPEKS has been tested with up to at least 10 levels of program calling ie
1. Method A uses Method B
2. Method B uses Method C
...
...
9. Method I uses Method J
10. Method J uses Method K
It should be able to cope with many more levels until it runs out of stack space.
One crucial thing to realise about Methods in MOPEKS is that every 64 bit word you can imagine constitutes a valid program line in MOPEKS. So if you just generate five random 64 bit words you end up with a valid computer program. This is right at the heart of Genetic Programming - you generate a random program and see how it performs.
But please bear in mind that an instructon line will be interpreted differently depending on which Method Class it is in. This is an example of Polymorphism, which will be familiar to Object Oriented Programming experts. See 'FAQ ⇨ General ⇨ Q4'
Here is the very first vaguely sensible Method generated by MOPEKS in its search for a five line program that will find square roots:
Private Function SquareRoots(ByVal R As Double) As Double
'Problem Description: '01 Square Roots'
'Generated by MOPEKS at 1.32 pm on Saturday 13th April 2013
Dim ax As Double, bx As Double, cx As Double, dx As Double
1: cx = R + cx
2: ax = bx + cx
3: If dx >= bx - 3 Then GoTo Out
4: If dx < 3 - 2 Then GoTo Out
5: If ax < bx - 1 Then GoTo 1
'Return
Out: SquareRoots = ax
End Function
If you look at this program you will find that it is basically garbage but it is very slightly better than random. Three of the lines do nothing but lines 1 and 2 boil down to:
ax = R
In other words, its first guess that is better than random is that the square root of 16 (or whatever) is 16. Significantly, if you look at the actual Method (that works) derived to find square roots, the guts of it are:
1: ax = R + 1
2: bx = R / ax
3: ax = bx + ax
4: ax = ax / 2
5: If bx < R / ax Then GoTo 2
And right there in the first line is:
ax = R + 1
If you work through this program line by line (see Guide ⇨ Factory ⇨ Review ⇨ Class 1) you will see that it finds square roots works by making an initial guess and then refining it. So clearly, the very first program that used "ax = R" was on the right lines.
Because of the way that MOPEKS is formulated there are only four variables that can go on the left hand side of a line of code in a Method, with or without an 'if', namely:
ax =
bx =
cx =
dx =
if ax ...
if bx ...
if cx ...
if dx ...
On the right hand side there are ten possible variables but only eight of them can be used in any particular class:
ax - always allowed
bx - always allowed
cx - always allowed
dx - always allowed
R or 3 allowed
S or 4 allowed
1 - always allowed
2 - always allowed
We use "R" and "S" as the two parameters to avoid possible confusion with "X" and "Y" which are normally used as the x and y co-ordinates in the environment.
This is because there are three bits allocated for storage (giving 8 possible values) of each right hand side variable. If "R" and "S" are present on the right hand side then "3" and "4" are not allowed. This is explained further in 'FAQ ⇨ Methods ⇨ Q4' This means that if you wish to use a number such as "90" you have to derive it using only ax, bx, cx, dx, 1, 2, 3 and 4 eg
double _stdcall Return90(){
// Problem Description: '16 Return 90'
// Generated by MOPEKS at 12.10 pm on Sunday 14th April 2013
// Initialise variables at zero
double ax = 0;
double bx = 0;
double cx = 0;
double dx = 0;
Line1: ax = 3 * 3;
Line2: bx = ax * ax;
Line3: ax = ax + bx;
out: return ax;
}
MOPEKS took less than two seconds to find this function and there are hints of intelligence here - could you have done better in two seconds? Or two minutes? This is typical of Genetic Programming.
Finally, you can only use one operator OR one totally freestanding Method on the right hand side (you cannot currently use 'if' with a Method). The following forms are permitted:
ax = S.Smell + ax
cx = dx / R.Velocity
if bx < S.Height * 2 then goto 2
dx = SquareRoot(S.Height)
Proceed(S, R)
The following forms are not permitted because they have more than one operator or the Method is not totally freestanding:
ax = bx + ax + 1
cx = cx + Friron(R.Knole)
cx = cx + dx / 3
if bx < Squide(R, ax) then goto 2
The essence of the MOPEKS Language (whether expressed as MOPEKS Basic or MOPEKS C) boils down to a highly simplified version of Assembly Language with its four registers ax, bx, cx, dx and endless 'jump' statements (equivalent to 'goto') together with elements of Visual Basic eg its use of Type enabling the user to create statements such as:
ax = MyObject.Property
The use of 'goto' is rightly frowned upon but X86 Assembly Language has over 30 different types of 'jumps' so ultimately all of your beautifully elegant Object Oriented programming ends up littered with what boils down to 'goto' statements when it is compiled.
The term 'Class' has slightly different meanings in Object Oriented Programming and .net languages but I have hijacked the term to mean something else yet again. I have used it to describe different types of Methods which deal with different numbers of parameters and objects. Maybe I should have called them 'Categories'. Too late now.
The MOPEKS Method Classes are as follows:
Class 1 - one parameter, 'R' eg find factorial of a number
Class 2 - two parameters, 'R' and 'S' eg sum of two squares
Class 3 - no parameter eg return 1028
Class 11 - one object, 'R' only eg find distance from this object to edge of table
Class 12 - two objects, 'R' and 'S' only eg find distance between two objects
Class 13 - no one object but consider all objects eg find the weight of all objects
Class 14 - one object, 'R' but consider all objects eg find the object closest to the radio
Class 21 - one object only, 'R' eg describe how this balloon expands when inflated
Class 22 - two objects only, 'R' and 'S' eg find a process that describes how the Shark swims towards the Tuna
Class 23 - no one object but consider all objects eg find a process that describes how this flock of birds behave
Class 24 - one object, 'R' but consider all objects eg find a process that describes how all the fishes flee from the Shark
Class 34 - one object only but consider all objects eg Brian kills the Lion by tempting it into the Pit
A Class 34 Method contains only Classes 21, 22, 23 and 24 since it consists of a number of
objects all interacting over a period of time.
Typical environments are:
Virtual environment containing no Objects, Properties or Methods
A meadow
The solar system
A number of cities
A literary party
Never-never land (in other words an imaginary environment to fit your wishes)
Typical objects are:
BrianTypical properties are:
HeightThe simulator is the whole point of MOPEKS and is the arena in which an object (eg "Brian") can solve problems. It cannot be stressed too strongly that the objects interacting in the environment being used by the simulator are doing so under the influence of Methods which have been derived by MOPEKS.
Currently these Methods are derived under human supervision but ultimately a computer system based on MOPEKS could spend all of its spare time working out the relationships between objects which it has observed through its cameras and other sensors. Just like a human being contemplating the world and how it operates.
So, it would watch a game of billiards and work out the necessary angle and velocity to strike the ball in order to win the game. Or maybe it would work out that Doreen is jealous of her friend's happiness and is seeking to undermine it.
The actual mechanism employed in the Simulator is yet again that of Genetic Programming. It considers all of the Methods which are available and experiments to build up a pool of promising Methods which can be employed in the correct sequence.
A major problem of any kind of hunt for a solution in 'solution space' is the "local optima".
To use an analogy, if you are trying to climb the highest mountain in the region but are blind, it may be that one technique is to just keep on going upwards. The problem is that you are then likely to find yourself at the top of a hill 1,000 feet high whereas unknown to you there is a mountain 10,000 feet high 20 miles down the road. If your criteria is always that things must improve for you to take that step you will never find this mountain. This is the problem that evolution faces insofar as that every step it takes has to be an improvement. This means that it cannot accept a backward step in order to move forwards.
The only solution to this in practice is for thousands or millions of separate entities to all try separate places. The analogy would be that if you were trying to explore a vast plain covered in mountains you would put thousands or millions of blind people on the plain and tell each one of them to always just walk upwards. Eventually one of them would walk up the highest mountain. The only way in which the highest mountain would not be found is if it were surrounded by a moat. This is because as soon as one of the blind people started to descend into the moat they would turn round and go back where they had come from. The only way they would actually find it in practice, therefore, would be if they were dropped on the other side of the moat.
To get round this problem in MOPEKS you will notice that after a few seconds if it has not found a solution it will give up and start again. This is the equivalent of dropping another blind person at random onto the plain to find a mountain.
The setting of Criteria of Success in MOPEKS is carried out by human beings as part of the definition of the problem to be solved. As long as MOPEKS is used to solve specific problems this will always be the case. Once it has sufficient knowledge in the form of Methods and the Properties of Objects it will be able to solve problems of its own creation.
You could say that MOPEKS needs a certain amount of training but so do people. By the time a person can do something useful they will have had at least 10,000 hours of training and have been fed, housed and clothed over a period of maybe 18 years. This is an enormous investment and every new person born needs all of that anew. And a lot of them turn out to be totally useless.
An intelligent system may need millions of hours of training (maybe the equivalent of a few hundred people) but once there can be copied millions of times.
When MOPEKS starts up it carries out a number of housekeeping tasks but these should only take a few seconds and you will then arrive at Reception which gives you the following choices:
In the Office you can set your individual preferences. This is better left to later and in the meantime MOPEKS will set these preferences for you.
If you insist on going to the Office then it is not a good idea to change things until you understand the consequences (which can be somewhat obscure if you are just starting to use MOPEKS).
If you DO change something and wish to revert to the original settings, please just click the 'Default Settings' button and this will repair the damage.
This is NOT a good place to start.
In the Stores you can view stored Starting Positions ('Static Trials'), stored 'Dynamic Trials' and also the results of Simulations which have been saved to disk.
THIS IS A GOOD PLACE TO START.
In the Workshop you can amend and create Starting Positions ('Static Trials') as well as create 'Dynamic Trials'. This can be quite demanding.
This is NOT a good place to start.
The Factory and the Simulator share the same facilities. In the Factory you can organise and watch Methods ( ie computer programs) of various types being manufactured by the evolutionary technique of Genetic Programming.
The Simulator allows an 'Intelligent Object' to use all of the Methods produced in the Factory in order to solve an immediate problem eg Survival in a Hostile Environment.
If you are a programmer you may well find this to be the most interesting part of MOPEKS but it is NOT a good place to start.
In Quality Control you can view a log of all of the significant errors which have occurred in MOPEKS since you first ran it. The actual file is here:
C:\MOPEKS\Error Log\Error Log.mtxt
You can delete parts of the file or all of it and even the folder itself without causing any damage but there is a lot to be said for just leaving it as it is. That way, if there is a troubling error you can send us all of the file via email to see what the problem is.
By all means start here but, hopefully, there will not be much to see.
In the Darkroom you can turn film, video clips or a series of still images into Dynamic Trials in a real life environment and hence derive the mathematics (ie Methods) involved in such a process. This task we have called 'Kinetics' (the 'K' in MOPEKS) and is best left until you are familiar with the other facilities available here.
This is currently under development and will feature in a future version of MOPEKS.
In the Laboratory you can disect Methods and see how they evolved. You can also translate them between MOPEKS Basic, MOPEKS C, Hexadecimal, Decimal and Binary formats.
Please note that you CANNOT actually run Methods in the Laboratory - that can only be done in the Factory. The emphasis in the Laboratory is on the STRUCTURE of Methods. This distinction will become clearer in due course.
If you DO decide to visit the Laboratory you will enter via the Airlock. This is NOT a good place to start.
In the Library you can create and amend Environments, Objects and Properties and Organise Methods. Essentially, this is all administrative work and is not particularly interesting. Worse, it can be quite tricky to understand.
This is NOT a good place to start.
In the Line Library you can examine all the lines of code which are used by the Methods stored in the Library. Currently, you can ONLY store and use Methods written in MOPEKS Basic (Methods can be OUTPUT in MOPEKS C for demonstration purposes but not actually used ).
you can use the Line Library in the Factory as a starting point when attempting to generate a Method. This is equivalent to Horizontal Gene Transfer in the biological world.
This is NOT a good place to start.
See 'The Future' on navigation bar above.
MOPEKS® and the Blue Logo are the Registered Trademarks of the MOPEKS Organisation
Website Published: 15th October 2013
Program Launched: 2nd November 2013
Copyright © MOPEKS Organisation 2013. All rights reserved
'MOPEKS Organisation' is the Trading name of Mopeks Ltd a company registered in England under number 07519676
The robot docking station is here
here