STATE MACHINES IN ARTIFICIAL INTELLIGENCE
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Giovanni Alestra<br />
<strong>STATE</strong> <strong>MACH<strong>IN</strong>ES</strong><br />
<strong>IN</strong> <strong>ARTIFICIAL</strong><br />
<strong>IN</strong>TELLIGENCE<br />
Graph, Hash, Mathematical Inference,<br />
State Analysis<br />
@ Copyright 2010 Giovanni Alestra
to my father<br />
3
Contents<br />
Introduction 7<br />
1.1 Definition and graph representation 8<br />
1.2 Linking data 9<br />
1.3 A real example of graph application 10<br />
1.4 Subgraph 12<br />
1.5 An algoritm to individuate subgraph 13<br />
1.6 Sliding Connections 17<br />
1.7 Filtering connections 18<br />
1.8 Fractal triangle 19<br />
1.9 Keeping a subgraph 19<br />
1.10Query as subgraph 20<br />
1.11Graph programming 22<br />
2.1 Bit definitions 24<br />
2.2 Transcription 24<br />
2.3 Transcription graph 26<br />
2.4 Memory 26<br />
2.5 Transformation 27<br />
2.6 Paths, and circuits 28<br />
2.7 Inverse transcription 30<br />
3.1 Algoritm to calculate the hash of a graph 32<br />
3.2 Counting 34<br />
4.1 Introduction to linked hash 36<br />
4.2 Example of discrimination 39<br />
4.3 Hash links 42<br />
4.4 How to dimensionete the hash space 43<br />
4.5 Identity Transformation 45<br />
4.6 Hash links collision (T,T+1 rule) 45<br />
4.7 Deletion of zero-record 47<br />
4.8 File system 47<br />
4.9 Identity table 48<br />
5.1 Mathematical problem representation 49<br />
5.2 First examples of mathematical deduction 52<br />
5
5.3 Further examples of mathematical deduction 55<br />
5.4 Structured Pieces 57<br />
5.5 Reaching the goal (checkmate) 60<br />
6.1 States of the problem 63<br />
6.2 Invariance 65<br />
6.3 Problem setting 66<br />
6.4 How to demonstrate a rule 67<br />
6.5 Forcing variant 67<br />
6.6 Real states of problem 70<br />
6.7 A mate variant 70<br />
6.8 Objective functions 61<br />
6.9 All in a number 72<br />
6.10Considerations 72<br />
7.1 Reasoning with graph 73<br />
Conclusions 75<br />
6
<strong>IN</strong>TRODUCTION<br />
The aim of this book is to build and implement intelligent state machines for the<br />
information management, The data structure, the memorization and inference<br />
techniques are proposed in order to have and effective implementation in real<br />
contexts, another purpose of this book is to explore states computing and to obtain<br />
notable advantages in application development. We are going to show a coherent<br />
and realizable theory that can improve the knowledge of engineers. The reader can<br />
further contribute to the content of this book in order to bring this project in to<br />
reality.<br />
7
PART I<br />
DATA STRUCTURE<br />
CHAPTER 1 : GRAPH<br />
1.1 Definition and graph representation<br />
A graph is defined as Set ( Vertices, edges ) where the edges connect the vertices. A<br />
graph is represented matematically in the form of matrix VxV in witch each entry<br />
is either zero and one. If a connection exists between vertexs i and vertex j a one is<br />
present at position (i,j) in the matrix. If connection between thes vertices does not<br />
exist we write a zero at position (i,j). If a connection exists between i and i, at<br />
8
position (i,i) we have a one, and this is possible for all vertices. It is easy to<br />
individuate this kind of connection from-to the same vertex looking for the values<br />
on the diagonal. An example of graph is :<br />
In this example graph, bi-directional edges are represented like an edge without<br />
arrow, in the graph, but it's evident that we have two different values in the<br />
matrix..<br />
1.2 Linking data<br />
In ooperations research the values in the matix are tipically associated with the<br />
flow from a vertex A to a vertex B. In this book the approach to the assocition of<br />
data in edges and vertices is different The reason is simple, we want to have the<br />
possibilty to associate an indeterminate number of information to verteces and<br />
edges.<br />
We can connect more than one information to verteces and edges and this data is<br />
9
stored in two different tables. The first table is about the information connected to<br />
verteces, where we have the vertex identifier and the list of information associated<br />
to the vertex. In the second table we have the edges, each of witch has an identifier<br />
formed by the union of origin vertex identifier and the destination vertex<br />
identifier . For every edge there is a list of information associated with the edge.<br />
1.3 A real example of graph application<br />
Suppose we have an application for travelling. For example a travel agency<br />
operating in Italy, with many travel destinations. For example:<br />
10
We can model this situation through a graph, in which we have the state, the<br />
regions, the provinces and the tourist places. In this graph are also present airline<br />
compani train and buses operating between these places. We can model all<br />
problems wtih the aid of a graph and create a tool application for maintenance of<br />
the travel to tourist places. This application assist the user with addinf, modify or<br />
deleting routes and tourist places. We can paint the following graph to represent<br />
this problem. :<br />
We interpose a node between two places, that indicates how we can travel (by<br />
airbus, train or bus) and we have another edge and node in witch indicating<br />
running time / travel time in order to have a complete inference about time of<br />
departure and travel time.<br />
11
Throught such a graph we can query the system with the following question :<br />
– How can I travel from Trapani at 7 a.m. to Milan at 8 p.m. ?<br />
The query has as response something like this :<br />
You can go:<br />
from Trapani to Palermo at 9:00 o'clock by Train ,<br />
from Palermo to Pisa at 12:00 o'clock by Airbus,<br />
from Pisa to Milano at 5.30 p.m. by Train arriving at 7.30 p.m.<br />
...<br />
The inferntial engine can be builded using algoritm that finds subgraphs. This<br />
concept is shown below. By simply adding vertices and edges we can model any<br />
kind of situation.<br />
1.4 Subgraph<br />
A subgraph is a graph with this property : Set ( V, E ) Subgraph = Sub Set ( V, E )<br />
graph. A subgraph is a selection of graph vertices with a selection of edges related<br />
to selected vertices. If we have data linked to vertices and edges the information on<br />
the subgraph must be a selection of the information of the related vertices and<br />
edges.<br />
12
also if the concept is simple, findind a subgraph is a complex problem. Hereafier<br />
we show an algoritm that helps finding a subgraph in graph. Identifying a subgraph<br />
is a fundamental operation in graph theory.<br />
1.5 An algoritm to individute a subgraph<br />
Suppose we have a graph and a subgraph :<br />
The algorithm to find a subgraph in a graph operates like this. At the first step we<br />
select a vertex in the subgraph. The selection can be random or intelligent. A<br />
random selection can select for example the vertices with information B, an<br />
intelligent selection is the node A. In this example we operate in intelligent way. If<br />
we have selected the vertices with information A we must find all vertices with the<br />
same information in the graph. If we cannot find vertices with the same<br />
information we cannot create any hypothesis of association between the vertex and<br />
the algorithm terminates with fault. In our example we have an only vertex with<br />
information A, so we have the hypothesis:<br />
H:[10=1]<br />
At the second step we select for each hypothesis the connection with vertices that<br />
are not in the hypothesis. We call connection an edge with the destination vertex.<br />
Now we enumerate the connection by information of edge and information of<br />
13
destination vertex. We have these connections :<br />
A → B with multiplicity 3 in graph and subgraph<br />
A → D with multiplicity 1 in graph and subgraph<br />
A → E with multiplicity 1 in graph and subgraph<br />
If a multiplicity of subgraph is greater of a multiplicity of a graph the algorithm<br />
terminates with fault. If this does happen, with must associate the combinations of<br />
vertices of graph and subgraph. In this example we have:<br />
A → B<br />
[2=11; 3=12; 4=13]<br />
[2=11; 3=13; 4=12]<br />
[2=12; 3=11; 4=13]<br />
[2=12; 3=13; 4=11]<br />
[2=13; 3=11; 4=12]<br />
[2=13; 3=12; 4=11]<br />
A → D<br />
[6=15]<br />
A → E<br />
[7=16]<br />
The final hypothesis are:<br />
[2=11; 3=12; 4=13; 6=15;7=16]<br />
[2=11; 3=13; 4=12; 6=15;7=16]<br />
[2=12; 3=11; 4=13; 6=15;7=16]<br />
[2=12; 3=13; 4=11; 6=15;7=16]<br />
[2=13; 3=11; 4=12; 6=15;7=16]<br />
[2=13; 3=12; 4=11; 6=15;7=16]<br />
14
At the next step we repeat the previous step looking for those vertices not present<br />
in the hypothesis. In this case we have only one connection:<br />
B → C<br />
For the first hypothesis we have:<br />
[2=11; 3=12; 4=13; 6=15;7=16] [5=14]<br />
for the second hypothesis we have :<br />
[2=11; 3=13; 4=12; 6=15;7=16] [5=14]<br />
the other hypothesis has a fault:<br />
[2=12; 3=11; 4=13; 6=15;7=16] [ 5=/ ]<br />
in fact if we associate the vertex 3 to vertex 11 there are no desired connections.<br />
Finally we have:<br />
[2=11; 3=12; 4=13; 6=15;7=16] [5=14]<br />
[2=11; 3=13; 4=12; 6=15;7=16] [5=14]<br />
[2=12; 3=11; 4=13; 6=15;7=16] [5=/]<br />
[2=12; 3=13; 4=11; 6=15;7=16] [5=/]<br />
[2=13; 3=11; 4=12; 6=15;7=16] [5=/]<br />
[2=13; 3=12; 4=11; 6=15;7=16] [5=/]<br />
At this point we have no vertex without hypothesis and we can perform the<br />
matching step within the matrix where the identifier has changed according to the<br />
hypothesis<br />
H 1 : [2=11; 3=12; 4=13; 6=15;7=16;5=14].<br />
15
Matrix: Graph-Subgraph<br />
Since the matrices are the same we have found a subgraph.<br />
H 2 : [2=11; 3=13; 4=12; 6=15;7=16;5=14].<br />
Matrix: Graph-Subgraph<br />
The matching is negative which means that we do not have a subgraph for this<br />
hypothesis.<br />
16
1.7 Sliding connections<br />
A sliding connection is a connection of one or more edges that connect two<br />
verteces with defined information. For example:<br />
The sliding connection indicates a connection of one or multiple edges that connect<br />
the vertex with information A to the vertex with information B. Suppose we have<br />
the following graph:<br />
The resulting connection is composed by two connections: A → X and X → B<br />
We have two different kinds of sliding connections: kind 1 and kind 2. The kind of<br />
connection is indicated in the graph by a number above the connection, like this:<br />
With the connection of kind 1 we are able to find only the first occurrence of the<br />
destination vertex, while with the connection of kind 2 we are able to find all the<br />
occurrence of destination vertex. For example:<br />
17
.<br />
The connection of kind 1 finds only the first occurrence of connection between A<br />
and B, the connection of kind 2 find the first and the second occurrence of<br />
connection between A and B.<br />
1.9 Filtering connections<br />
Different informatuib can be associtated to an edge. If information is associated to<br />
a sliding connection it occurs that only compatible connection can be selectedith<br />
sliding happen that only compatible conncetion can be selected. We call this<br />
concept “filtering connections”. This example shows the concept:<br />
The concept is simple, filtering connection means to select only edges having the<br />
18
information of the sliding connection. This is really useful, indeed since we can use<br />
a simple sliding connection without information if we want to select all the edges,<br />
and adding information if we want a selection with major semantics.<br />
1.8 Fractal triangle<br />
The fractal triangle is often shown as a game of intelligence and used to<br />
determinate the I.Q. of humans. By the use of sliding connection we can solve the<br />
problem to determinate how many triangles are present in a fractal triangle. The<br />
problem is to find subgraph with sliding connection of kind 2. The number of<br />
subgraphs that we find is the number of triangles in a fractal triangle.<br />
The image shows the subgraph definition and the fractal triangle.<br />
Finding subgraphs we find the number of triangles in the fractal triangle.<br />
1.9 Keeping a subgraph<br />
When we solve a sliding connection we can keep all vertices that are in the path<br />
from origin vertex to the destination vertex. This operation is called “Keeping a<br />
Subgraph”. Keeping Subgraph is really useful and adds notable power to our<br />
19
system. For example:<br />
The resulting subgraph is:<br />
We show by an example the power of keeping subgraph. We recall the first<br />
example in this book.<br />
1.10 Query as a subgraph<br />
In the first example we showed how to model a travel problem by using a graph.<br />
Now we show queries mat be represented as subgraphs with sliding connections h<br />
sliding and the query respose may be obtained from a graph..<br />
20
Suppose we want to go from Trapani to Pisa. The query graph is this subgraph:<br />
The response of the query is the keeping graph:<br />
To have a string as response with the calculation of the correct travel time we need<br />
a graph programming, a programming with function to visit the graph and extract<br />
information about the problem. In order to make the reader able to program using<br />
graph functions, it is necessary to discuss a bit graph programming.<br />
21
1.11 Graph programming<br />
To implement graph programming functions we need a software library with the<br />
following methods :<br />
1. Editing Graph<br />
2. Finding Subgraph<br />
3. Keeping Subgraph<br />
4. Surfing Subgraph<br />
Editing a graph is a graphic tool; Finding a subgraph and keeping a subgraph are<br />
two algorithms. Surfing subgraph is a system using cursor as pointer to point a<br />
vertex can surf throw the edges and keep information about vertices and edges.<br />
The complete program solves the travel example like this:<br />
MA<strong>IN</strong> FUNCTION<br />
1. Print “Start Form:”; Input StartPlace;<br />
2. Print “At:”; Input StartTime<br />
3. Print “To:”; Input ToPlace<br />
4. Graph Query = new Graph (StartPlace, 1);<br />
5. Query.AddConnection (1, SECONDK<strong>IN</strong>D, “” , 2 );<br />
6. Query.AddDataToNode ( 2, EndPlace );<br />
7. Graph[] KeeptedGraph = FindAndKeepSubgraph ( MainGraph, Query );<br />
8. For Each KeeptedGraph KG { SolvePath ( StartPlace, StartTime, KG,<br />
ToPlace ); }<br />
9. End<br />
SOLVEPATH FUNCTION : String SolvePath ( String StartPlace, Time StartTime,<br />
Graph KG, String To Place )<br />
10. if (StartPlace==ToPlace) Return “.”;<br />
11. Cursor P = KG.FindVertex ( StartPlace );<br />
12. String By; Time UsefulTime<br />
22
13. Return “From “ + StartPlace + “ by “ + GetInformation ( Cursor.moveTo<br />
(NEXT) , StartTime, By, UsefulTime + “ At “ + UsefulTime + “ To “ +<br />
(ArriveAt=Cursor.moveTo (NEXT).GetData()) + “\n” + SolvePath<br />
( ArriveAt, UsefulTime, KG, ToPlace );<br />
14. End<br />
GET<strong>IN</strong>FORMATION FUNCTION : void GetInformation ( Cursor C, Time<br />
StartTime, String & By, Time & UsefulTime )<br />
15. String[] Inf = C.GetData();<br />
16. int FirstRun = null;<br />
17. for ( int i = 0; i < inf.lentgh(); i++ ) { if ( Inf[i] == “Train” ) By= “Train”<br />
else if ( Inf[i] == “Airbus” ) By = “Airbus”; else if ( FirstRun == null }<br />
FirstRun = Inf[i]; else if ( FirstRun > Inf[i] ) FirstRun=Inf[i]; if<br />
( StartTime < Inf[i] and (Inf[i] < UsefulTime or UsefultTime == null ) )<br />
Usefultime = Inf[i]; }<br />
18. if ( UsefulTime = null ) UsefulTime = FirstRun; //Next day<br />
19. Return<br />
20. End<br />
So our example is completely solved<br />
Start From: Trapani At: 8:00 To: Pisa<br />
– From Trapani by Airbus at 8 a.m. To Rome, From Rome by Airbus at 12<br />
a.m To Milan From Milan by Train at 3,30 p.m. To Pisa<br />
23
CHAPTER 2 : SEMANTIC GRAPH<br />
2.1 Bit definitions<br />
A bit definition is associated to information of a single vertex or a single edge. If<br />
we have a vertex with defined information we can add a semantic information. For<br />
example, we can associate a unique semantic information to different vertices<br />
:<br />
The semantic information added means that the vertex is a delimitator.<br />
Conventionally we indicate this concept with the simbol -|-. Bit definitions are very<br />
fast to solve and can be applied to vertices and edges. They are really powerful in<br />
the transcription process..<br />
2.2 Transcription<br />
A transctipyion is a continuous process of finding subgraphs to whom vertices and<br />
edges are added, since we have a complete representation characterized by<br />
impossibility to find subgraphs not transcripted before.<br />
24
y transcription, semantic informatuin is added automatically to a graph and it is<br />
very powerful in creating graphs with regularity that are fundamental in our<br />
system.. Suppose we have defined a set of graphs with respective processes of<br />
adding vertices and edges as following picture:<br />
Based on these definitions the following graph:<br />
is transcripted with the next one graph:<br />
25
The first graph, the graph without transcription can be created automatically from<br />
assertions. For example the assertion :<br />
– Set Colours ( Red, Green, Blue )<br />
The graph transcripted has a regular structure and a major semantics of the simple<br />
assertion graph. Now we show how a defined graph or a transcription of a graph<br />
can be associated to a simple expression or to a simple subgraph.<br />
2.3 Transcription graph<br />
A graph composed of more graphs is called “Transcription graph”. The<br />
transcription graph definition is a list of graphs that we find in the transcription<br />
process. By the transcription graph definition we can get all the structure of a<br />
transcripted graph and so is more useful as we show the next paragraph.<br />
2.4 Memory<br />
When we find a subgraph we can link this subgraph with a graph in memory. This<br />
is a process of associative memory and is very powerful in analysing the meaning<br />
of an assertion. For example we can associate to the simple graph Set Colours the<br />
entire transcription of the Set Colours shown before:<br />
26
In this way, when we have an assertion or a representation of reality, we are able to<br />
recall a great number of concets in order to have a good inference or an upgrade of<br />
the knowledge of our system.<br />
2.5 Transformation<br />
A transformation is a process associated tipically to the recognition of a subgraph<br />
or to a command called trigger in a session of graph programming. A<br />
transformation modifies a graph by adding or deleting vertices and edges. The<br />
concept of transformation is very easy to understand by an example. An example of<br />
transformation can be the deletion of the last element of a SET.<br />
27
Associated with assertion :<br />
It is evident that the process of transformation is a process of graph programming<br />
that must be implemented, but more complex processes can be obtained by the reuse<br />
of transformation functions. For example the delection of all elements of a set<br />
can be considered as the iteration of process of deleting the last element since the<br />
set is empty.<br />
2.6 Paths and circuits<br />
If we delete a vertex of a graph we obtain a minor of a graph but in the process of<br />
deleting vertices and edges we can compromise the structure of the graph.<br />
28
This problem can be solved by the definition of paths and circuits. Paths,and<br />
circuits are graphs having tipically sliding connections and their definition can<br />
solve the problem of maintenance of the coherence of the graph. We show the<br />
concept by an example. Suppose we want to delete the second element of a set. We<br />
obtain a graph like the previous : If we define two subgraphs with sliding<br />
connection like this :<br />
We obtained the graph<br />
By the fusion of two consecutive delimitators we have:<br />
29
The circuits are graphs with sliding connections having circles. The concept is the<br />
same, we can define paths, and circuits to have the maintenance of the structure of<br />
the graph after deleting of vertices and edges.<br />
2.6 Inverse transcription<br />
The inverse trascription is the process to extract a string from a graph. If the graph<br />
has a regular structure the inverse transcription can be a composed function. How<br />
to define an inverse transcription is a problem of graph programming. Now we are<br />
going to explain the concept. Suppose we have the graph:<br />
We want that the output of the inverse transcription is:<br />
– The Set Colours has the elements : red , green , blue<br />
we can easily define a function for the inverse transcription like this:<br />
1. Graph ITSubgraphs = FindSubgraph ( MainGraph, TranscriptionOfSet )<br />
2. If ( ITSubgraphs == null ) Return<br />
3. For Each ITSubgraph SET { InverseTranscriptionOfSet ( SET );<br />
FUNCTION InverseTranscriptionOfSet ( Graph SET )<br />
4. Cursor C = SET.FindVertex ( “Set” );<br />
30
5. Print “The Set “; String ( C.moveTo ( “NEXT” ) ); Print “ has elements : “<br />
6. Graph FirstElement = FindSubgraph ( FirstSetElement );<br />
7. Cursor E = FirstSetElement.FindVertex ( “Sete”);<br />
8. PrintElementsOfSet ( E )<br />
FUNCTION PrintElementsOfSet ( Cursor E )<br />
9. Print String ( E.moveTo ( “Begin” ) );<br />
10. E = E.moveTo ( next ); if ( E == null ) return else { Print “,”;<br />
PrintElementsOfSet ( E );<br />
11. End<br />
The library function String prints the String between two delimitators.<br />
31
CHAPTER 3 : HASH OF A GRAPH<br />
3.1 Algorithm to calculate the hash of a graph<br />
It is possible to calculate the hash of a graph with a simple algorithm. We indicate<br />
in this book the hash of a representation with a letter between two pipes like this:<br />
Hash = | R |. If we use a function based on trucament we have this property :<br />
| x 1 + x 2 + ... + x n | = | | x 1 | + | x 2 | + | ... | + | x n | |<br />
This expression can be read as the hash of sum that is equal to the hash of sum of<br />
the hash and introduce the commutative property of the sum to the sum of the hash.<br />
Based on this function if we have a graph like this, we can calculate the hash on<br />
this way :<br />
In the first step of the algorithm we change the rows and columns and associate the<br />
vertex idenfifier to the values, from major to minor or viceversa, of the hash of the<br />
information linked to the vertex. We can see that there are values of hash that are<br />
equals. In this case we must calculate all combinatory association between<br />
32
idenfier and values. Finally we apply the hash of the hash sum calculate the final<br />
hash value of the graph. Now we show an example of application.<br />
In the first step we associate the identifier to the value of the hash of information<br />
from the minor to major.<br />
H : 0403 : O → C<br />
H : 3789 : O → B<br />
H : 8532 : O → A<br />
H : 9111 : O → D<br />
we can have a first association of vertices like this:<br />
[1=2] , [ 2=1; 3=3; 4=5] , [5=6; 6=7], [7=4]<br />
The matrix changes on this way :<br />
Now we must calculate all combinatory associative combination as:<br />
[1=2] , [ 2=3; 3=1; 4=5] , [ 5=6, 6=7] , [ 7=4 ]<br />
[1=2] , [ 2=3; 3=4; 4=3] , [ 5=6, 6=7] , [ 7=4 ]<br />
...<br />
33
[1=2] , [ 4=1; 3=3; 2=5] , [ 5=7; 6=5 ] , [ 7=4 ]<br />
We show the last combinatory association as follows. Every association as an hash<br />
that is component of the final hash of the sum of the hash.<br />
For the last combinatory association :<br />
[1=2] , [ 4=1; 3=3; 2=5] , [ 5=7; 6=6 ] ,[ 7=4 ]<br />
we have this matrix :<br />
The final value of the hash is : | |4333| + |...| + …. + |...| + |2121| |.<br />
3.2 Counting<br />
Pratically, without the counting process we are not able to apply the algorithm<br />
shown before because the combinations of combinatory process, in case we have a<br />
number of information replied around twenty, are too much to computate. With the<br />
counting process that consist in the association of a numeric information to the<br />
vertex having equals information, the problem can be solved. Suppose we have the<br />
Set graph, we can add the counting information so :<br />
34
The counting is a graph programming process very easy to implement but having<br />
fundamental function.<br />
35
PART II<br />
SPACE OF <strong>STATE</strong>S<br />
CHAPTER 4 : L<strong>IN</strong>KED HASH<br />
4.1 Introduction to linked hash<br />
If we have a graph or a representation we know how to calculate correctly the hash,<br />
and this representation is related to a logical context characterized by logic<br />
transformation; we can store the evolution of the states of the logical representation<br />
just by storing the hash value of all states and linking these values toghether.<br />
36
Suppose, for example, we have a chessboard and we want to memorize the opening<br />
moves for chess game. We can operate in this way :<br />
We see that the hash value is composed of :<br />
| | Transformation | + | Transformed Representation | |<br />
We can delete the reppresentation and leave only the hash linked. Suppose we have<br />
a structure like this, in which we have multiple values of the same hash related to a<br />
different rappresentation.<br />
37
How can we determinate if a representation is related to one of the multiple hash<br />
values ?<br />
An example of collision can be this :<br />
To determinate the hash relative to actual representation we can take into account<br />
the following logical steps. If the hash correctly corresponds the first value to |234|,<br />
(the value on the top), then a trasformation that produces |987| must exist. If such<br />
trasformation exists the transformed representation releated to |987| may be further<br />
transformed to obtain |864|. It is possibile to visit the entire structure with certain<br />
pair to :<br />
Hs is the Hash space tipically 2 k<br />
m<br />
Hs m /∏ T i<br />
i=1<br />
, m is the number consecutive link we<br />
analize and T i the number of possible trasformation of each step.<br />
The error rate is equal to :<br />
38
m<br />
Hs m /∏ i=1<br />
Ti −1<br />
We can set the error according to our task, for example 10 −10<br />
4.2 Example of discrimination<br />
Suppose we have a situation like this :<br />
Suppose we have a chessboard in the initial configuration.. In order to discriminate<br />
the hash |234| we operate in this way : We calculate all possible transformation of<br />
the representation, and apply the rule we learn above. If the representation is really<br />
what we search, there must exist a transformation that produce |987|. The appliable<br />
transformation produces hash |987|, |877| and again |987|. I this case we can<br />
observe a collision. Applying the same rule we are able to discriminate in this<br />
case :<br />
.<br />
39
How we can see, there exist two transformation having the desired value. For the<br />
discrimination of the two, we calculate the transformation for each one :<br />
Possible Transformation of : d2-d4
41<br />
The existence of the desired transformation is evident. Now we can see that the<br />
disired information for the other representation does not exist.<br />
Possible Transformation of : c2-c4<br />
We have shown how the discrimination process works. And we have to<br />
demonstrate the formulas of centain and error that we remember are :<br />
and<br />
m<br />
Hs m /∏ T i<br />
i=1<br />
m<br />
Hs m /∏ i=1<br />
Ti −1<br />
After the analysis of ten links we have a certain around : 20 10 and the error rate<br />
is around 1/20 10<br />
.<br />
41
4.3 Hash links<br />
We can realize hash links and create a simple record for every reppresentation we<br />
want to store in our system composed by the hash of the representation and the<br />
hash links. We can realize hash links by the use of four prime numbers two, three,<br />
five and seven.<br />
Suppose we have a structure like this :<br />
For each level of the tree we have a repetition of the sequence : two-six-three-six.<br />
To delete the link you need operate as follow:<br />
42
We have a connection between two representation if there exists one and only one<br />
prime number common in the hash link and the hashes of the link sre different If<br />
we want to delete a connection we can insert another prime number like five or<br />
seven. The number of bits necessary for the implementation are four.<br />
4.4 How to dimesionate the hash space<br />
The record space is the number of records (hash) we can store in memory. It is<br />
related to the memory and to the number of bits necessary to store a record. The<br />
hash space must be dimensioned using this formula :<br />
Hs≫T max∗Rs<br />
43
T max is the maximum number of transformations applicsble to the<br />
representation. We can call dim the ratio :<br />
so that Hs=dim∗Rs .<br />
dim=Hs/Rs<br />
When we operate the hash of link the certain and the error rate change. The<br />
certain,in the worst case, is equal to :<br />
m<br />
Hs/N r m /∏ i=1<br />
2∗T i <br />
N r is the number of records stored in a memory. If the hash space has been<br />
dimensionated correctly, then we have:<br />
and error rate is equal to :<br />
If N r=R s we have:<br />
R s / N r m ∗dim m /∏ 2∗T i i=1<br />
R s / N r m ∗dim m /∏ 2∗T i i=1<br />
−1<br />
m<br />
dim m /∏ i=1<br />
m<br />
m<br />
2∗T i .<br />
.<br />
44
4.5 Identity Transformation<br />
The identity transformation associate another hash value based to a transformation<br />
that modifies the representation in order to obtain a different hash value. We<br />
indicate the identity transformation as :<br />
Identity=∣T R∣<br />
In this way an inderminate number of identity hash values can be associated to a<br />
transformation doing more transformation of tranformation. For example :<br />
Identity=∣T T R∣<br />
4.6 Hash links collision (T, T+1 rule)<br />
When we store in memory a record composed by the hash of representatio and the<br />
hash of links it could happen that the record is stored have hash representation<br />
equals and different hash links. In this case we must not store the record in a<br />
memory and we must apply the T, T+1 rule. This rule says that we can store the<br />
record using an identity transformation for the hash of the representation in order<br />
to not have collisions. So we must define an algorithm for the correct storiang. I<br />
want to explain the algorithm with an example.<br />
Suppose we have an empty record space.. We can store the first record as follows.<br />
00100110010-0001<br />
At this point we must store another record that is composed by the identity<br />
transformation hash value, by the zero in the hash of links.<br />
10101001010-0000.<br />
This last record is called zero-record. The rule says that if we have a<br />
representation R 1 its transformation R 2 is related to R 1 if and<br />
45
only if the Identity transformation of R 2 ,is stored as a zero-record.<br />
Suppose we have another record we want to store and we have an hash links<br />
collision :<br />
00100110010-0001<br />
10101001010-0000.<br />
00100110010-0101<br />
in this case we cannot store the record but we store its Identity transformation and<br />
we add a zero record with the identity transformation of the identity<br />
transformation.<br />
00100110010-0001<br />
10101001010-0000.<br />
01110110010-0101<br />
11010101010-0000<br />
Suppose we have the hash relative to the first record have stored in a memory.<br />
Applying the rule we can determinate its relation. If we have the hash relative to<br />
the second record stored in memory, the rule has negative result for the first record.<br />
In fact the identity transformation of the second record is not a zero-record, but it is<br />
the record we are searching. So we can consider it as hash related to the<br />
representation if its identity transformation is a zero-record.. So we can reassume<br />
that the T,T+1 rule, say that in order to stare a record we must to find a<br />
transformation or an indentity trasformation with this storing property :<br />
T R=Unique ,T 1 R=Unique<br />
T+1(R) is the zero-record. When we want to discriminate the relation, we must<br />
apply the same rule :<br />
∃T R ,∃T 1 R as zero−record<br />
46
4.7 Deletion of zero-record<br />
When we have stored all the records in memory we can delete the zero records.<br />
The T,T+1 rule changes and become:<br />
∃T R not zero−record , not ∃T 1 R<br />
Not all zero records can be deleted, Suppose we have a record:<br />
000101001010-0000<br />
and we cannot store the record :<br />
000101001010-0010<br />
so we store the records based on identity transformation and T,T+1 rule:<br />
011110101101-0010<br />
10001010100-0000<br />
So the forst zero-record is not deletable, while the last zero-record is deletable. We<br />
can mark the deletable of a record using a bit.<br />
4.8 File System<br />
The file system is structred as follows. The file name is the most significative bit of<br />
the hash of the representation.<br />
In the file we have the remaining bits of the hash of representation with the four<br />
bits of the hash of links. The physical or logical position of the record represents<br />
the identifier:<br />
File Name : 1011010101111010001010111<br />
47
01011111-00000011<br />
11101010-00000110<br />
11100001-00001010<br />
11101010-00001010<br />
The values are not sorted because the phical or logical position is the identifier, but<br />
we can have multiple values of the same hash relative to different representation.<br />
We know how the system works. If we want to use a database engine and a<br />
database table to store the records, then the identifier can be a primary key.<br />
4.6 Identity Table<br />
We know that the hash value is composed by the sum of two hash values :<br />
| | Transformation | + | Transformed Representation | |<br />
So two equal representations can be a different hash because they have different<br />
transformations. In this situation we use a table called “Identity Table”, that<br />
indicates two hashes have the same representation. The Identity Table is so<br />
composed :<br />
The identity table and his processes about are fundamental for finding a solution<br />
for loop problems in recursive process.<br />
48
PART III<br />
LOGICAL <strong>IN</strong>FERENCE<br />
CHAPTER 5 : Mathematic demostrations<br />
5.1 Mathematical problem representation<br />
Through a methematical problem representation we can solve a problem using the<br />
mathematical logics taht is int the mathematical formulas. We are going to analize<br />
chess inferences.<br />
49
mathematical representation that consists in formulas about possibile moves of<br />
pieces, and concept about the winning or losing. After we have the mathematical<br />
representation is evident that we can apply all mathematic theories, proofs and<br />
algebra.<br />
We analize a chess final, the final of rook composed by the interaction of two<br />
pieces, king and rook of a colour, and the only king of the opponent. The formulas<br />
express that the possibile moves are :<br />
Possible Move of King:<br />
X k t1=X k t∏ 1<br />
b<br />
a<br />
−1∗X j ∗T :1 X k t18<br />
Y k t1=Y k t∏ −1∗Y j∗T :1Y k t18<br />
1<br />
with a∈[1,2]<br />
with b∈[1,2]<br />
with 1 X jY j2with X j∈[0,1]∧Y j∈[0,1] with T ∈[0,1]<br />
a indicate the direction of moving to the left or to the right<br />
b indicate the direction of up or down movement<br />
X j indicate if we want to move on the selected direction to the left or to the<br />
right<br />
Y j indicates if we want to move on the selected direction up or down<br />
1 X j Y j 2 means that we must move in one of the selected directions<br />
T indicates if we can move or if the opponent can move<br />
50
Possible Move of Rook:<br />
X r t1= X r t X d ∗a∗1−T :1 X r t18<br />
Y r t1=Y r t Y d ∗1−a∗1−T :1Y r t18<br />
with a∈[0,1]<br />
with−7 X d −1∨1 X d 7<br />
with−7Y d −1∨1Y d 7<br />
with T ∈[0,1]<br />
a indicates the perpendicular or parallel direction<br />
X d is a discrete number that indicates how many positions we want to move<br />
Y d has the same function of X d<br />
T indicate if we can move or if the opponent can move<br />
The concept about winning or losing is the possible capture of the pieces. We have:<br />
The King captures the Rook<br />
X k t1=X rt ,Y k t1=Y rt<br />
The Rook captures the King<br />
X rt1=X k t ,Y rt1=Y k t<br />
51
This is the representation of the problem. After the representation we are able to<br />
deduce matematically rules for the game.<br />
5.2 First examples of mathematical deduction<br />
With the first example, we introduce a fundamental concept called : “Condition<br />
sine qua non”, that is a condition taht can be used in the reasoning process. We<br />
want to deduce when a rook can capture viceversa. For humans the concept is very<br />
simple and obvious, but the computer needs to do a mathematical computation to<br />
understand when it is possible.<br />
In the first example we can find the answer of when the rook can capture the king<br />
by solving this formula :<br />
X r t ∗T X r t1∗1−T = X k t∗1−T X k t1∗T<br />
and<br />
Y r t ∗T Y r t1∗1−T =Y k t∗1−T Y k t1∗T<br />
that for T =0 becomes :<br />
X r t =X k t1∗T<br />
Y r t =Y k t1∗T<br />
and for T =1 becomes:<br />
X r t1= X k t <br />
Y r t1=Y k t <br />
we must analize all the combinations of possible variable state in order to find the<br />
conditio sine qua non.<br />
Case T =1<br />
52
X r t X d ∗a= X k t<br />
Y r t Y d ∗1−a=Y k t<br />
Case a=0<br />
X r t =X k t This is a condition IF<br />
Y r t Y d =Y k t<br />
Case a=1<br />
X r t X d = X k t<br />
Y r t =Y k t This is a condition IF<br />
The conditions we have found are conditio sine qua non.<br />
We have the first answer : it is possible to capture the rook if T =1 and<br />
X r t =X k t or Y r t =Y k t .<br />
It is clear that for T =1 it is not possible to capture the king.<br />
A second example is the possible capture of the rook by the king.<br />
a<br />
X k t ∏ 1<br />
b<br />
Y k t ∏ 1<br />
−1∗X j ∗T = X r t <br />
−1∗Y j ∗T =Y r t <br />
we analize only the case that T =0<br />
Case a=1 b=1 X j =1 Y j =0<br />
53
X k t −1= X r t X k t= X r t 1<br />
Y k t =Y r t<br />
Case a=1b=1 X j =0Y j =1<br />
X r t =X k t<br />
Y r t −1=Y k t Y r t=Y k t 1<br />
Case a=1 b=1 X j =1 Y j =1<br />
X k t −1= X r t X k t= X r t 1<br />
Y r t −1=Y k t Y r t=Y k t 1<br />
Case a=2 b=1 X j =1Y j =0<br />
X k t 1= X r t X k t= X r t −1<br />
Y k t =Y r t<br />
Case a=2 b=1 X j =0Y j =1<br />
X r t =X k t<br />
Y r t −1=Y k t Y r t=Y k t 1 equals to previous case<br />
….<br />
By the complete analysis of the combination we find eight positions in which the<br />
rook can be captured. Now we can deduce that the capture is possible if :<br />
∣X r t− X k t ∣1∧∣Y r t−Y k t∣1<br />
After that we have the inverse concept, that is when it is not possible to capture the<br />
roook..<br />
∣X r t− X k t ∣1∨∣Y r t−Y k t∣1<br />
54
X r t − X k t Y r t −Y k t<br />
-1 0<br />
-1 -1<br />
0 -1<br />
1 -1<br />
1 0<br />
1 1<br />
0 1<br />
-1 1<br />
5.3 Further examples of matematical<br />
deduction<br />
How to move to defence the rook from the attack of the opponent's king ?<br />
We know that a rook can be captured if :<br />
∣X r t− X k t ∣1∧∣Y r t−Y k t∣1<br />
So we can say that we choose correctly :<br />
X d ∧Y d :∣X r t− X k t ∣1∨∣Y r t−Y k t∣1<br />
Another way to solve this problem is to calculate a unique formula derived from<br />
the system of two formulas :<br />
55
X r t1= X r t X d ∗a :∣X r t1− X k t∣1<br />
Y r t1=Y r t Y d ∗1−a:∣Y r t1−Y k t∣1<br />
Case a=0 :<br />
X r t1= X r t X d<br />
X r t11 X k t X r t1=2 X k t X a with X a ≥0<br />
2 X k t X a =X r t X d<br />
X d =2 X k t −X r t X a<br />
X r t1=2 X k t X r t− X r t X a<br />
X r t1=2 X k t X a<br />
Case a=1 :<br />
Y r t1=Y r t Y d<br />
Y r t11Y k t Y r t1=2Y k tY a with Y a ≥0<br />
2Y k tY a =Y r tY d<br />
Y d =2Y k t −Y r tY a<br />
Y r t1=2Y k t Y r t−Y r tY a<br />
Y r t1=2Y k t Y a<br />
The absolute value impose to analize −X d ,−Y d we will find :<br />
X r t1=−2X k t− X a<br />
Y r t1=−2Y k t−Y a<br />
This demonstration shows how we must move the rook in order not to have a<br />
sacrifice. The picture shows the concept :<br />
56
5.4 Structured Pieces<br />
A rook can have a position near the opponent's king, if and only if the capture of<br />
the rook implicates the capure of the king. I want to leave this demonstration to the<br />
reader and write a table for the three cases represented :<br />
X rt=−1 X k1t∧Y rt−Y k t=−1<br />
in this case<br />
57
X k2 t Y k2t<br />
X k2 t= X rt−1 Y k2t=Y rt−1<br />
X k2 t= X rt−1 Y k2t=Y rt<br />
X k2 t= X rt−1 Y k2t=Y rt1<br />
It is easy to demonstrate that in this case reassumed in the table, the opponent king<br />
can move only to a=2, b=2 because if a=1∧ X j=1∨b=1∧Y j=1<br />
we have the capture of the king. I want to demonstrate this inference because it is<br />
fundamental in the process of finding the forcing variant I explain in the next<br />
chapter :<br />
X k1t1=X k1t ∏ 1<br />
Y k1t1=Y k1t∏ 1<br />
a 1<br />
b 1<br />
−1∗X j1<br />
−1∗Y j1<br />
a=1, X j1=1 impossible, and b=1,Y j1=1 impossible. Now we can<br />
consider to solve the problem the position we have found. We must demonstrate<br />
that there exists a possible move of the rook that implies the capture of the rook in<br />
the direction we analyze. Remember that the capture of the rook occurs when :<br />
X rt1=X k1t X r t Xd∗a= X k1t withY rt=Y k1t<br />
or<br />
Y rt1=Y k1tY rtYd∗1−a=Y k1t with X rt=X k1t<br />
58
if<br />
X rt=−1 X k1t∧Y rt−Y k1t=−1<br />
we have<br />
−1X k1t Xd∗a= X k1t with Y rt=Y k1t<br />
solved for X d=1 ,a=1<br />
and<br />
−1Y k1tYd∗1−a=Y k1twith X rt= X k1t<br />
solved for Yd =1 , a=0<br />
We must analize the case : a=1, X j1=1 , in this case :<br />
X rt= X k1t ,Y rt=Y k t−1Y d=1 , a=0 capture.<br />
case b=1,Y j1=1<br />
Y rt=Y k1t , X rt=X k1t−1 Xd =1,a=1 capture<br />
case a=1, X j1=1,b=1,Y j1=1 implicates the capture of the opponent's<br />
king. We have to demonstrate that for T =0 moves the king, and it exists a<br />
position in witch:<br />
X k1t1=X k1t 1<br />
or / and<br />
Y k1t1=Y k1t1<br />
59<br />
59
5.5 Reaching goal (checkmate)<br />
Before showing how we can reach the checkmate in the rook's final , we must<br />
demonstrate when a king cannot move in the opponent's direction. The condition<br />
is:<br />
with: a=1 and X j =1<br />
X k2 t ∏ 1<br />
b2<br />
Y k2 t ∏ 1<br />
a2<br />
a<br />
X k t ∏ 1<br />
b<br />
Y k t ∏ 1<br />
−1∗X j ∗T<br />
−1∗Y j ∗T<br />
X k t −1∗T capture<br />
−1∗X j2 ∗T = X k1 t−1∗1−T <br />
−1∗Y j2 ∗T =Y k2 t∏ 1<br />
b1<br />
−1∗Y j1 1−T <br />
60
The capture is possible when :<br />
we begin analizying the first condition :<br />
X k2 t1∏ 1<br />
we analize for T =0<br />
is solved for :<br />
a2<br />
X k2 t1= X k1 t1<br />
Y k2 t1=Y k t1<br />
−1∗ X j2 ∗T = X k1 t1−1∗1−T <br />
X k2 t =X k1 t−1<br />
b1<br />
Y k2 t =Y k2 t∏ 1<br />
X k2 t =X k1 t−1<br />
Y k2 t =Y k2 t<br />
−1∗Y j1 <br />
Indeed, to determine this last formula we analize all possible cases of combination<br />
of the variable b 1, b 2, Y j1 , Y j2 . We can compile a table and verify the only<br />
case possible to capture for T =0 and T =1 in all cases is<br />
Y k2 t =Y k2 t<br />
61
1 Y j1 Y k2 =Y k1 Y k2 =Y k1 −1 Y k2 =Y k1 1<br />
1 0 OK OK OK<br />
1 1 OK OK --<br />
2 1 OK -- OK<br />
2 0 OK OK OK<br />
We can inference that :<br />
Y k2 t =Y k2 t<br />
So the goal of the game can be calculated by this reasoning :<br />
If X k1 =8 a=2, X j1 =1 impossible<br />
if X k2= X k1−1∧Y k2=Y k1 a=1, x j1=1 impossible<br />
if Y r =Y k1 ± 2 X a b=1 ,Y j1 =1 impossible and b=2, y j1 =1<br />
impossible.<br />
This means that there does not exist a ,b , X j1 , Y j1 without capture. The<br />
position is checkmate. The system can calculate automatically the goal of the<br />
game.<br />
62
PART IV<br />
<strong>STATE</strong> ANALYSIS<br />
CHAPTER 6 : THE PROBLEM SOLVER<br />
6.1 States of the problem<br />
The number of states of the problem is related to all possible configurations of the<br />
pieces. A configuration can be expressed by the use of distance variables. In our<br />
problem we have six significative distances like the following picture shows.<br />
Therefore a state of the problem can be represented by a tuple :<br />
d 1, d 2, d 3,d 4, d 5, d 6<br />
63
All possible states are : 1310848. The next picture shows the significative<br />
distances:<br />
An evalutation of the number of states can be done considering that :<br />
0≤d1≤7<br />
0≤d2≤7<br />
−7≤d3≤7<br />
−7≤d4≤7<br />
−7≤d5≤7<br />
−7≤d6≤7<br />
the number of the states without considering the real possible configurations can be<br />
calculated as follow : 8 2 15 4 =3240000 . In order to obtain the only<br />
consistent configuration of pieces we must add the following conditions:<br />
d1∣d3∣≤7<br />
d2∣d4∣≤7<br />
d1∣d5∣≤7<br />
d2∣d6∣≤7<br />
not d3=0∧d4=0<br />
64
not d5=0∧d6=0<br />
not d5=d6∧d7=d8<br />
In this way we can obtain the number of states we have mentioned above.<br />
6.2 Invariance<br />
Rotationg the chessboard we obtain another one that is logically related to the first<br />
one and we can apply all knowledge about of problem to one or the other<br />
chessboard. This concept is called invariance.<br />
Now we choose the instance of the chessboard where d 1 ∧d 2 are inferior. We<br />
can see that the correct move in this example is Y rt1=Y rt2 .<br />
65
The invariance reduces the number of possible states so that the distances<br />
d3 ,d4 become positive 0≤d3≤7 , 0≤d4≤7 .<br />
In this way have a reduction of the number of possible states.<br />
6.3 Problem Setting<br />
We can represent the problem as a different sequence of possible moves of white<br />
and black pieces. The move of the white pieces is indicated with W i , while the<br />
move of black pieces is indicated with B i . Thus, the interaction of three pieces<br />
two of the same colour and one of a different one can be set as follow :<br />
W i=W 0i ,W 1i:W 0iW 1i=1∗T with w 0∈[0,1] , w 1∈[0,1]<br />
B i=B 0i : B 0i=1∗1−T with B 0i∈[0,1]<br />
T =m mod 2<br />
W 0a , b , X j ,Y j indicate all possible moves of white king<br />
W 1a , Xd ,Yd indicate all possible moves of white rook<br />
B 0a ,b , X j ,Y j indicate all possible moves of black king<br />
we can create two different sequences of movies, one of white moves and one of<br />
black moves :<br />
SW i=[W 0,W 1,... ,W m]<br />
SB i=[B 0, B 1,... , B m]<br />
the index indicates the move, considering T =m mod 2 the sequence has this<br />
structure:<br />
66
SW i=[1,0 ,0,0 ,0,1 ,0,0 ,1,0 ,... ,0,0 ,0,1]<br />
SB i=[1 ,0 ,1 ,0 ,1 ,... ,0 ,1]<br />
a set of possible sequences of moves of white or black pieces are indicated like<br />
this:<br />
SW =[SW 0, SW 1,... , SW p]<br />
SB=[SB 0, SB 1,... , SB p]<br />
6.4 How to demonstrate a rule<br />
In our system we try to demonstrate some rules that can be used in reasoning by<br />
the inference machine. A process demonstrating the rules rules is this :<br />
∃m , SW :∀ SB i∈SB ∃ SW i∈SW goal<br />
In other words we can affirm the existence of a number of moves “m” and a set of<br />
possible moves of white pieces. This implicate that to every move of black piece<br />
corresponds one or more sequences of white moves<br />
6.5 Forcing variant<br />
The forcing variant is the sequence of possible moves that implicate d 1=0 .<br />
The invariance implicates that d 1=0 or d 2=0 , so the forcing variant has<br />
as goal the condition d 1=0∨d 2=0 .Now we must demonstrate the existence<br />
of a number of moves necessary to achieve this goal.<br />
∃m , SW :∀ SB i∈SB ∃ SW i∈Sw d 1=0∨d 2=0<br />
67
The problem solver finds a several number of possible sequences of moves like<br />
this:<br />
68
…<br />
We can write the formulas we have found based on the distance by this sobstitution<br />
:<br />
X k1=8−d1 ,Y k2=8−d 2<br />
X k2=8−d1−d3 ,Y k2=8−d2−d4<br />
X r=8−d1−d5 ,Y r=8−d2−d6<br />
by this substitution we can inference that the forcing variant is not the function of<br />
variables d 1 , d 2 . For example in the case we have show in paragraph about<br />
structured pieces we have :<br />
X rt=−1 X k1t∧Y rt−Y k t=−1<br />
becomes<br />
8−d1−d5=−18−d1∧8−d2−d6−8−d2=−1<br />
d5=1∧d6=1<br />
69
And the same occurs for the rest of formulas. That implicates the indipendence of<br />
the goal from variables d 1 , d 2.<br />
6.6 Real states of the problem<br />
At this point we can say that the states of the problem are related only to the<br />
condiction: d 1=0∨d 2=0 and the significative distances are only<br />
d 3, d 4,d 5,d 6 . Thus the number of states of the problem is : 10108. The<br />
optimal solution for the rook's final in the chess game are around 10 4<br />
states.<br />
6.7 A mate variant<br />
The mate variant has the condition d 1=0 , and states related to the distances<br />
d 3, d 4,d 5,d 6 . The picture shows the sequence of correnct movies :<br />
70
Therefore we know how the system works to find the solution of the problem. The<br />
number of states is 10108.<br />
6.8 Objective functions<br />
We can analize a problem and insert the distance for the problem solution in every<br />
state. Choosing a state means to select, from the current state,<br />
71
the one having the inferior distance from the solution of the problem. If we have<br />
the same states for more problems we can insert a lot of objective functions in the<br />
states. So a state becomes :<br />
| | Obj. Fun. 1 : Dist. 1 | + | Obj. Fun. 2 : Dist. 2 | … + | Transform. | + | Rapp. | |<br />
6.9 All in a number<br />
We can memorize all the object functions with relative distances, the<br />
transformation and the representation in a number. If we want to move from a state<br />
to another state we must to do the hypothesis related to the distance of all objective<br />
function and not only of the function in which we are interested. In our example we<br />
can operate like this :When we have a representation in order to find the state<br />
stored in memory we must to do an hypothesis about the possible transformation<br />
that produces the representation and the hypothesis of object function distances.<br />
We do not need to use identity table for this application.<br />
6.10 Considerations<br />
The current memory size is terabytes. How many abilities we can store in memory<br />
of terabytes using the methods showed in this book? For a memory of only one<br />
terabyte I evaluete that we can store around 10000000 of abilities of medium<br />
complexity. I think this is the moment to implement intelligent state machines.<br />
72
PART V<br />
HUMAN KNOWLEDGE<br />
CHAPTER 7 : KNOW REPRESENTATION<br />
7.1 Reasoning with graph<br />
When we do not have a mathematic representation of a problem or it it is not<br />
sufficient we can create a system using only graphs or an hybrid system using<br />
graphs and mathematical representations.<br />
73
We know that it is possible to do the hash of a graph so that a graph can be used to<br />
represent a state. If it is possible to have transformation functions of a graph we<br />
can link the hash of graph with the the transformed graph in order to have a state<br />
machine that solve a problem. These methods use massively graphs and subgraphs<br />
with sliding connections. The nature of the problem is determinable by the kind of<br />
subgraph and it's combination found in the graph of the problem. Methods like<br />
transcription are more useful, and we can apply all graph theories. The problem<br />
solver by using graph is simple and it is related to abstaction of graph in witch<br />
trannsformations are applicable.<br />
74
CONCLUSIONS<br />
At the beginnig of the present work we explained how a data structure like a graph<br />
can be used for the representation of real world. If we can apply a hash operation<br />
on a representation in order to store his evolution through different states then we<br />
can build a stete machine. Applying mathematical logics to inference rules and<br />
goals assists in solving mathematical representation problems. The number of<br />
states of a problem can be reduce by identifying subgoals, rules and inference<br />
methods. If a mathematical representation does not exist and we need knowledge<br />
concerning the problem we can use graphs as literature to teach.<br />
In an only server using memory of several terabytes we can store a great number of<br />
problems solutions. Which i's the most important success of this theory. How to<br />
build the inferential engine requires an entire book for the game game and a lot of<br />
books for problems of different nature.<br />
75