Click here to Skip to main content
Licence CPOL
First Posted 26 Nov 2009
Views 19,031
Bookmarked 3 times

Console pseudo Artificial Intelligence

By | 26 Nov 2009 | Article
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)

About the Author

prof3ssor


Self employed
United States United States

Member

Coding and Mathematics is my life, without it I do not know what I would be.

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
GeneralThis is a joke, right? PinmemberProgramm3r22:19 13 May '12  
GeneralMy vote of 1 PinmemberDreamSoft.ps13:54 9 May '12  
GeneralMy vote of 1 Pinmemberkamiccolo23:20 28 Dec '09  
GeneralMy vote of 1 PinmemberT-Gadfly6:02 12 Dec '09  
GeneralMy vote of 1 PinmemberDan Neely2:19 30 Nov '09  
GeneralMy vote of 1 PinmemberThe Cake of Deceit9:23 29 Nov '09  
GeneralI love this! PinmvpHans Dietrich10:43 28 Nov '09  
GeneralMy vote of 1 PinmemberJouketje5:56 27 Nov '09  
GeneralMy vote of 1 PinmemberRichard MacCutchan5:49 27 Nov '09  
GeneralMy vote of 1 PinmemberMichael B. Hansen23:54 26 Nov '09  
GeneralTo be; or not to be..... PinmemberProgramm3r19:21 26 Nov '09  
GeneralMisunderstood PinmemberJohn Spectacle19:05 26 Nov '09  
GeneralMy vote of 1 PinmemberBartosz Wojcik14:38 26 Nov '09  
GeneralMy vote of 1 Pinmembersplendiderwer12:26 26 Nov '09  
GeneralMy vote of 1 PinmemberNicholasSimmons9:06 26 Nov '09  
GeneralYou forgot something... PinmemberNicholasSimmons9:05 26 Nov '09  
GeneralMy vote of 1 PinmemberGünther M. FOIDL8:39 26 Nov '09  
GeneralMy vote of 1 PinmemberUroš Šmon7:31 26 Nov '09  
GeneralMy vote of 1 Pinmembersam.hill6:34 26 Nov '09  
GeneralMy vote of 1 PinmemberRedFraggle5:50 26 Nov '09  
GeneralMy vote of 1 Pinmemberjharrison5:41 26 Nov '09  
GeneralMy vote of 1 PinmemberWilliam John Adam Trindade4:51 26 Nov '09  
GeneralMy vote of 1 PinmemberSeishin#4:09 26 Nov '09  
GeneralMy vote of 1 PinmemberArmando Airo'3:54 26 Nov '09  
GeneralMy vote of 1 PinmemberClaude Martel Olivier3:52 26 Nov '09  

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.

Permalink | Advertise | Privacy | Mobile
Web02 | 2.5.120517.1 | Last Updated 26 Nov 2009
Article Copyright 2009 by prof3ssor
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid