Click here to Skip to main content
15,917,709 members
Articles / Artificial Intelligence

Console pseudo Artificial Intelligence

Rate me:
Please Sign up or sign in to vote.
2.62/5 (44 votes)
26 Nov 2009CPOL1 min read 59.8K   6   38
Console application that assumes artificial inteligence to the feable user

Introduction

Presenting a way to "fake" Artificial Intelligence (AI), leading the user to assume that the application is responding to their every command.  

Background

In Newton's 3rd Law of Motion, it states that every action has an equal and opposite reaction. We can apply this theory within our application by saying that every input will provide us with an output formed according to the input. This is call AI. 

Using the code 

Here we can see how some of the internal AI logic is structured:  

Console.WriteLine("What is your name?");
string name = Console.ReadLine();
Console.WriteLine("Hello " + name + ", how are you?");

The Console class which comes from the System namespace is used in this instance. The class exposes very useful methods which we can use to create our AI application, namely the WriteLine(string value) and the ReadLine() methods. The write line in our context, presents text through the console and gives the user the impression that the console is interacting with them. When the user types a reply to a question suggested by the console, the console already anticipates the answer and when an answer is given, it is taken and output to the user. This is where the input -> output scenario comes into play. 

The term "pseudo" is intelligently used to describe the application's AI. This is to not mislead the developers in assuming that the use of complex and absolute AI is used, but rather to show that it is simply producing output according to predefined actions  

Points of Interest

It is interesting to note how scientific concepts have so much relevance, even within a computing environment or context. 

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Self employed
United States United States
Coding and Mathematics is my life, without it I do not know what I would be.

Comments and Discussions

 
Joke[My vote of 1] Great article! Pin
Alessandro Bernardi26-Nov-09 3:27
Alessandro Bernardi26-Nov-09 3:27 
GeneralMy vote of 1 Pin
Member 184689326-Nov-09 3:26
Member 184689326-Nov-09 3:26 
GeneralOMG Pin
Helbreder26-Nov-09 3:19
Helbreder26-Nov-09 3:19 
GeneralRe: OMG Pin
Dev_258027-Nov-09 0:51
Dev_258027-Nov-09 0:51 
QuestionDemo project? Pin
567890123426-Nov-09 3:17
567890123426-Nov-09 3:17 
AnswerRe: Demo project? Pin
Programm3r13-May-12 22:18
Programm3r13-May-12 22:18 
GeneralAI Mechanics Pin
John Spectacle26-Nov-09 3:05
John Spectacle26-Nov-09 3:05 
GeneralRe: AI Mechanics Pin
prof3ssor26-Nov-09 4:12
prof3ssor26-Nov-09 4:12 
Ah yes John, I am glad you spotted the simplicity which the algorithm supplied. Simplicity is the way in which great things are made. Let me explain...

When first teaching someone to ride a bicycle, you do not fill their mind with techniques needed to ride to take sharp corners at a high velocity, rather you encourage the core technique of riding. This would then allow the person to firstly accept the concept, use it, learn it and discover how to corner well themselves.

You say that the AI might be taken aback when a user fails to answer in a certain manner. Firstly it is absolutely absurd that let us take a conversation, where a humanoid asks "how are you?" that the other person would defame his biological mother's name. The conversation would end and fists would start flying around. I do not believe that users would enter false information because there is a general fear of technological power amongst the commoners.

Let me simply emphasize more detail about the algorithm. input -> processing -> output. The processing would then analyze what was entered and an output rendered accordingly. This resolves the issu mentioned above about incorrect information.

Applying mutators to the algorithm is actually a genius concept John and I am eternally grateful for the remark. The ultimate goal is, as you state, the infinite monkey theorem. The problem with this is that you application may simulate skynet and soon control is lost and with it your user's interest, since the application would consume all the user's thoughts and use it against them. My offspring are bots and they will be brought up in binary, learning to program using vacuum tubes, watching movies in 1s and 0s and produce offspring whose Intelligence Quotiant is exponentially greater than their own.

Your deepest and most sincere mathematician, prof3ssorSuspicious | :suss:

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.