PIRP is still learning, and growing into an intelligent robot, if you would like to make a suggestion, I would be happy to have a look.
Some useful JavaScript rescources are:
New demo practicing using other windows...Foreground Color Red Green Blue
Background Color Black White Yellow
About it
PIRP's first memory was an array of objects, which had details about a user, there are various functions to manipulate the data of the users
Pirp will move away from having a javascript memory and move more towards having it stored in a database.Thoughts about Artificial Intelligence (AI)
To sum it up, extremely briefly. If you can make a program that is forever curious, and/or has a need for love, then you have made A.I. which could become the next cyborg.
One of the problems is being able to mimic a humans needs in a program, as when a human is born, they have physical needs, of food, warmth, comfort, shelter and love, amongst others. On the other hand, a computer program usually has no senses, and receives input just from a keyboard, it would need to be prgrammed to have a need for things, such as to find out everything it can about every person it comes into contact. If that kind of curiosity could be programmed, we are close to A.I.
It's possible to make a program, to ask certain questions, however problems to overcome include handling advanced English grammar, which some people may use in their input, and knowing how much to inquire., such as, "Why did you break up with your partner" --> Why did he say that? Why is he mean -> it could end up in a pretty long "why loop"..
Some ideas on Sentence Recognition for Artificial Intelligence
At the moment Pirp can identify between a question and a statement, by recognizing question words.I want PIRP to recognize parts of a sentence.
Eg. If someone asks PIRP:
What countries have you been to?
What --> Go to the 'what' function.
Check next word -> 'country' First check common words like prepositions and modals, 'is, are, would, could, should, am, '
If not in the common words then check for nouns.
If not in list of nouns. Then ask.
'What are countries'?
And add the answer to list of word definitions to check for addition to noun database.
If countries is in the database then take the rest of the phrase as a group phrase
'have you been to'
Have you been to can trigger a check in memory of places Pirp has been to.
If 'places PIRP has been to' is empty the answer would be.
I haven't been to any countries besides this one. What countries have you been to?
When asking the question, What countries have you been to? Pirp can open up a new column for data stored for that person, titled countries been to. And store the answer there. (Or stored in the temp data needed to be checked by moderator section)
Basically the way Pirp will interpret sentences will work like above. With another check first done. 'common phrases' for common phrases, such as greetings, it may be ok, just to have standard outputs based on the 'mood' of pirp and Pirp's relationship with the person.
For not so common greetings etc. it would go as follows.Take the whole sentence/question
Scan for any unknown words.
If there is an unknown word, then ask the speaker what the word is.
Ask the speaker to ask another question as this sentence needs moderation
If there are no words pirp doesn't know, work out what function to go to .
E.G. What should I do today? - this doesn't need to be a common phrase as can have different answers depending on the kind of day, the date etc.
Pirp would go to the function for 'What should I do' with the keyword 'today' Pirp could look up the date, and see if there are any famous events on.
If there are no big events, the weather could also be checked. Or he could ask 'how is the weather'. Based on the reply a set answer could be given which is better than giving a set reply for the question.
E.g.2 What kind of job should I apply for?There are 2 main phrases. 'what kind of job' and 'should I apply for'
It is quite a complex question. Which could require lots of memory look up if it is done properly.
Firstly 'what kind of job' would get pirp ready to look up a list of jobs from the database Then 'should I apply for' would first get pirp to look up the persons current job. And hobbies. If pirp deesnt know the person he could say
I don't know you well, + a generic answer such as a job with good pay sound goodOr if he does know the speakers hobbies, such as diving. Pirp could say. Why don't you apply as a diving instructor.
For this to work there would have to be relatonships in the database between activities and related jobs. Like Diving -> Diving instructor
With those relationships in place it would make it easy for pirp to give answers based on hobbies.
Eg. Hobby computer games --> job --> web designer, programmer, computer operator, game designer, could all be related to that hobby.
An example of Pirp just using set responses without the use of a database or sentence structure knowledge would be:
What should I do after I finish high school? Pirp --> Relates this question to a command box --> 'are you interested in further study or work? yes / no
user --> clicks yes for further study /work
pirp --> command --> work or study?
user --> study
pirp --> prompt --> what area do you think would be best for you to study?
the answer would be put into a function which would deal with various answers
eg. --> user --> graphic design
pirp -->prompt --> Do you know what kind of graphic design courses are available?
user --> not really..
pirp -->uses a function which reads 'not really'/ 'no'/ 'nah' etc.
pirp opens a new window which has links of popular places and course information about graphic art.
could possibly just open a google search with' graphic design courses' in the search critera.
* would also need to find the users desired study location and could get other details as well.