Click here to Skip to main content
11,709,581 members (53,924 online)
Click here to Skip to main content

Tagged as

Console pseudo Artificial Intelligence

, 26 Nov 2009 CPOL 34.4K 6
Rate this:
Please Sign up or sign in to vote.
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)

Share

About the Author

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

You may also be interested in...

Comments and Discussions

 
GeneralMy vote of 1 Pin
FRANCISCO NEVES4-Nov-12 13:40
memberFRANCISCO NEVES4-Nov-12 13:40 
GeneralThis is a joke, right? Pin
Programm3r13-May-12 22:19
memberProgramm3r13-May-12 22:19 
GeneralMy vote of 1 Pin
DreamSoft.ps9-May-12 13:54
memberDreamSoft.ps9-May-12 13:54 
GeneralMy vote of 1 Pin
kamiccolo28-Dec-09 23:20
memberkamiccolo28-Dec-09 23:20 
GeneralMy vote of 1 Pin
T-Gadfly12-Dec-09 6:02
memberT-Gadfly12-Dec-09 6:02 
GeneralMy vote of 1 Pin
Dan Neely30-Nov-09 2:19
memberDan Neely30-Nov-09 2:19 
GeneralMy vote of 1 Pin
The Cake of Deceit29-Nov-09 9:23
memberThe Cake of Deceit29-Nov-09 9:23 
GeneralI love this! Pin
Hans Dietrich28-Nov-09 10:43
mvpHans Dietrich28-Nov-09 10:43 
GeneralMy vote of 1 Pin
Jouketje27-Nov-09 5:56
memberJouketje27-Nov-09 5:56 
GeneralMy vote of 1 Pin
Richard MacCutchan27-Nov-09 5:49
memberRichard MacCutchan27-Nov-09 5:49 
GeneralMy vote of 1 Pin
Michael B. Hansen26-Nov-09 23:54
memberMichael B. Hansen26-Nov-09 23:54 
GeneralTo be; or not to be..... Pin
Programm3r26-Nov-09 19:21
memberProgramm3r26-Nov-09 19:21 
GeneralMisunderstood Pin
John Spectacle26-Nov-09 19:05
memberJohn Spectacle26-Nov-09 19:05 
GeneralMy vote of 1 Pin
Bartosz Wojcik26-Nov-09 14:38
memberBartosz Wojcik26-Nov-09 14:38 
GeneralMy vote of 1 Pin
splendiderwer26-Nov-09 12:26
membersplendiderwer26-Nov-09 12:26 
GeneralMy vote of 1 Pin
NicholasSimmons26-Nov-09 9:06
memberNicholasSimmons26-Nov-09 9:06 
GeneralYou forgot something... Pin
NicholasSimmons26-Nov-09 9:05
memberNicholasSimmons26-Nov-09 9:05 
GeneralMy vote of 1 Pin
Günther M. FOIDL26-Nov-09 8:39
memberGünther M. FOIDL26-Nov-09 8:39 
GeneralMy vote of 1 Pin
Uroš Šmon26-Nov-09 7:31
memberUroš Šmon26-Nov-09 7:31 
GeneralMy vote of 1 Pin
sam.hill26-Nov-09 6:34
membersam.hill26-Nov-09 6:34 
GeneralMy vote of 1 Pin
RedFraggle26-Nov-09 5:50
memberRedFraggle26-Nov-09 5:50 
GeneralMy vote of 1 Pin
jharrison26-Nov-09 5:41
memberjharrison26-Nov-09 5:41 
GeneralMy vote of 1 Pin
William John Adam Trindade26-Nov-09 4:51
memberWilliam John Adam Trindade26-Nov-09 4:51 
GeneralMy vote of 1 Pin
Seishin#26-Nov-09 4:09
memberSeishin#26-Nov-09 4:09 
GeneralMy vote of 1 Pin
Armando Airo'26-Nov-09 3:54
memberArmando Airo'26-Nov-09 3:54 
GeneralMy vote of 1 Pin
Claude Martel Olivier26-Nov-09 3:52
memberClaude Martel Olivier26-Nov-09 3:52 
GeneralMy vote of 1 Pin
Philip F.26-Nov-09 3:46
memberPhilip F.26-Nov-09 3:46 
GeneralRe: My vote of 1 Pin
SB200310-May-12 9:04
memberSB200310-May-12 9:04 
GeneralMy vote of 1 Pin
Sandro7826-Nov-09 3:37
memberSandro7826-Nov-09 3:37 
GeneralMy vote of 1 Pin
leppie26-Nov-09 3:31
mvpleppie26-Nov-09 3:31 
Joke[My vote of 1] Great article! Pin
Alessandro Bernardi26-Nov-09 3:27
memberAlessandro Bernardi26-Nov-09 3:27 
GeneralMy vote of 1 Pin
Member 184689326-Nov-09 3:26
memberMember 184689326-Nov-09 3:26 
GeneralOMG Pin
Resry26-Nov-09 3:19
memberResry26-Nov-09 3:19 
GeneralRe: OMG Pin
Dev_258027-Nov-09 0:51
groupDev_258027-Nov-09 0:51 
QuestionDemo project? Pin
Alex Fr26-Nov-09 3:17
memberAlex Fr26-Nov-09 3:17 
AnswerRe: Demo project? Pin
Programm3r13-May-12 22:18
memberProgramm3r13-May-12 22:18 
GeneralAI Mechanics Pin
John Spectacle26-Nov-09 3:05
memberJohn Spectacle26-Nov-09 3:05 
GeneralRe: AI Mechanics Pin
prof3ssor26-Nov-09 4:12
memberprof3ssor26-Nov-09 4:12 

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

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

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.150819.1 | Last Updated 26 Nov 2009
Article Copyright 2009 by prof3ssor
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid