EvilZone

Programming and Scripting => Projects and Discussion => : pllaybuoy May 07, 2013, 10:36:04 PM

: How does artificial intelligence programming work ?
: pllaybuoy May 07, 2013, 10:36:04 PM
I am very confused , I tried finding the answer but had no luck . I am talking about programming  , like how do you write a piece of code that is artficially intelligent ?
To my guess , that can be a well planned web of loops and if-else statements .
If you even have the slightest idea of it then kindly share that with me . I am not sure if this question suits in this board  - My apologies in advance . Hope this discussion will go well . You are welcome to answer how you think it 'might' work even if you don't 'know' how it 'works'.


-regards
: Re: How does artificial intelligence programming work ?
: vezzy May 07, 2013, 11:04:32 PM
AI programming is such a diverse and complex subject that it's probably best for you to just do some research.

Specialized languages suited for AI exist (Prolog is widely used). AI programming requires lots of mathematics and algorithms in its most refined forms.

AI can also be simpler, however. For instance in video games, it could simply be an entity reacting to certain input from the player. The AI can be instructed specifically how to react to a certain event, e.g. being in close proximity. Additionally, most games require a pathfinding algorithm, so that the AI can navigate efficiently across a map in the shortest fashion.

Perhaps the simplest example of AI I can think of is a chatterbot (such as Cleverbot). Try reading up on those. Then again, any program that responds in a believable and dynamic manner to human input can be considered AI.
: Re: How does artificial intelligence programming work ?
: namespace7 May 07, 2013, 11:41:38 PM
First of all there are different levels of AI.
Two main categories are Weak AI and Strong AI.

Weak AI can be anything from a chatbot like Alice to something like an opponent in a chess game or a racing game.
Its not the type of intelligence that we humans poses. It is simply a choice tree of what to do in what circumstance and so on.
Systems with weak AI appear to be intelligent, but they are not in relation to human type of intelligence. They obviously do not have self-awareness or consciousness.

And thats what makes Strong AI special. Strong AI is the human-like intelligence. Not just a script that checks inputs with the db of choices but a system that understands that it is a system and that it can reason and think :D
Unfortunately, or maybe fortunately, we as human race have not been able to create a fully functional Strong AI system with real human-like intelligence.

There are intermediate categories too... read a book on AI if interested.

Now obviously to code Weak AI and Strong AI you would need completely different tools and technologies, as well as different programming techniques and maybe even different methodologies.

For example to write a game opponent AI you can do it in ANY language. Be it PHP or C++. As long as the language has control statements and loops you are good to go. For example "If player is getting closer accelerate and move away from the player". This kind of stuff. Of course it gets complex for a good weak AI system.

For harder weak AI problems people use languages like Prolog and Lisp which I know nothing about.

Now for Strong AI I have no idea :D You would have to do more research.

To practice writing AI just make some simple game... like tic tac toe with options "easy, medium, hard, unbeatable".
Then move to a checkers game. Then to chess. Or maybe poker. Yeah poker AI opponent would be nice to program :)
You get the idea.
: Re: How does artificial intelligence programming work ?
: Mordred May 08, 2013, 11:09:36 AM
Mhm, I don't have much more to contribute apart from what was said, however I wanted to say that if you're talking about AI in the sense of a TRUE artificial intelligence (i.e. something we haven't created yet, ever), then I highly recommend you read up on Neural Networks (http://en.wikipedia.org/wiki/Neural_networks) and pick up some of Isaac Asimov (http://en.wikipedia.org/wiki/Isaac_Asimov)'s books on robotics.

The man is a genius, and he envisioned problems and their solutions when discussing how a real robot (a real AI) would interact with a human and deal with all kinds of conflicts that are inherent to a machine working under a set of rules (The 3 Rules of Asimov (http://en.wikipedia.org/wiki/Three_Laws_of_Robotics)).
: Re: How does artificial intelligence programming work ?
: proxx May 08, 2013, 12:01:21 PM
I have a book lying around somewhere that touches the subject.
Understanding how humans solve problems is a massive subject by itself.
These fundamentals are a must for any real AI programming.
Humans arent logical, thats where the shit begins.
In fact we are not even capable of logic.
No time to explain but its very fucking interesting.
: Re: How does artificial intelligence programming work ?
: rasenove May 08, 2013, 12:06:58 PM
Whats the name of that book? I must read it.
: Re: How does artificial intelligence programming work ?
: proxx May 08, 2013, 03:21:39 PM
Lol alright, had a PM asking the same question.
Im at work so dont have time to search for a PDF.

Morton Hunt : universe within

Its mainly about human psychology and a Must read, great book.
It touches the subject of AI , it might be dated but give great insight into how humans think, where computers fail etc.
Been couple years though, got it somewhere on a book market somewhere.

Its also full of challanges/puzzles a few of which apparantly cannot be solved by X% of the population.
He also exaplains why we fail at solving them :)
How the memory works etc etc
: Re: How does artificial intelligence programming work ?
: namespace7 May 08, 2013, 07:46:21 PM
I must also add that to even start understanding the field of Strong AI you have to spend years researching and learning about novel computing (neural network simulations and other exotic stuff) as well as human psychology and neurology. There are so much you need to understand to even start thinking about creating real AI.

Its hard as hell and that's why no one has been able to do it yet. But once its done... we might be in trouble :D
A self conscious machine is smart, can reason, is aware of itself... :D
: Re: How does artificial intelligence programming work ?
: bluechill May 09, 2013, 04:31:27 AM
First of all there are different levels of AI.
Two main categories are Weak AI and Strong AI.

Weak AI can be anything from a chatbot like Alice to something like an opponent in a chess game or a racing game.
Its not the type of intelligence that we humans poses. It is simply a choice tree of what to do in what circumstance and so on.
Systems with weak AI appear to be intelligent, but they are not in relation to human type of intelligence. They obviously do not have self-awareness or consciousness.

And thats what makes Strong AI special. Strong AI is the human-like intelligence. Not just a script that checks inputs with the db of choices but a system that understands that it is a system and that it can reason and think :D
Unfortunately, or maybe fortunately, we as human race have not been able to create a fully functional Strong AI system with real human-like intelligence.

Strong AIs (commonly called "Sentient AIs") do not exist.  Neural networks do not even have the capacity right now to even *maybe* make one.  We need a ton more research to get even close. 

AIs really are broken down into the categories of applications and frameworks.  For instance, there are AIs specifically for natural langauge processing and others for RTS Strategy Games.  And each of these can use many different frameworks or architectures on the backend, they can use neural networks, simple C++ rules, Cognitive Architectures, there is a ton of stuff they can use.  Basically AI is a *very* complicated and complex field and you really can't explain it well in any short amount of time.

@OP I suggest you just look into different frameworks for AIs like neural networks and try making your own simple "AIs" like Conway's Game of Life and what not.
: Re: How does artificial intelligence programming work ?
: hackias December 16, 2013, 08:21:25 AM
AI strategies in games are often that of search strategies where entities inherit path finding algorithms to move around a map.  An example would be counter strike with bots which wander around a map to mimic a human player.  An example would be the A* search algorithm.

Alternatively in games like chess, checkers and other 2-player games, an AI search strategy would be the MiniMax algorithm, one player denoted min, one player denoted max.  The objective is for each to maximise their goal.  One player wants a high score and will choose an action which leads to a maximum value, the defeating player wants to minimise the score hence the MiniMax terminology used.  Value in this context would be denoted a state,  Many states exist equal to the number of legal chess moves possible to a player, e.g. choose the move with the best state (best min or max value relative to player min or max).

 
: Re: How does artificial intelligence programming work ?
: bluechill December 16, 2013, 08:04:00 PM
AI strategies in games are often that of search strategies where entities inherit path finding algorithms to move around a map.  An example would be counter strike with bots which wander around a map to mimic a human player.  An example would be the A* search algorithm.

Alternatively in games like chess, checkers and other 2-player games, an AI search strategy would be the MiniMax algorithm, one player denoted min, one player denoted max.  The objective is for each to maximise their goal.  One player wants a high score and will choose an action which leads to a maximum value, the defeating player wants to minimise the score hence the MiniMax terminology used.  Value in this context would be denoted a state,  Many states exist equal to the number of legal chess moves possible to a player, e.g. choose the move with the best state (best min or max value relative to player min or max).

 


Oooh it looks like someone else here actually knows and works with AI besides me.  Entirely correct and awesome ! :D
: Re: How does artificial intelligence programming work ?
: chapp January 01, 2014, 01:16:14 PM
Most universities with a CS department have courses in machine learning, which teaches you the mathematics behind learning from available data and make predictions based on this.


This is how stock exchange system work, by receiving information and acting according to prior "knowledge"