Author Topic: How does artificial intelligence programming work ?  (Read 2261 times)

0 Members and 1 Guest are viewing this topic.

Offline pllaybuoy

  • Peasant
  • *
  • Posts: 70
  • Cookies: -3
    • View Profile
How does artificial intelligence programming work ?
« on: 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
"Monsters are real , ghosts are real too . They live inside us and sometimes they win"

Offline vezzy

  • Royal Highness
  • ****
  • Posts: 771
  • Cookies: 172
    • View Profile
Re: How does artificial intelligence programming work ?
« Reply #1 on: 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.
Quote from: Dippy hippy
Just brushing though. I will be semi active mainly came to find a HQ botnet, like THOR or just any p2p botnet

Offline namespace7

  • Sir
  • ***
  • Posts: 561
  • Cookies: 115
  • My Brother's Keeper
    • View Profile
Re: How does artificial intelligence programming work ?
« Reply #2 on: 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.
"A programmer’s greatest enemy isn’t the tools or the boss or the artists or the design or the legacy code or the third party code or the API or the OS. A programmer’s greatest enemy is getting stuck.
Therefore a crucial step to becoming a better programmer is learning how to avoid getting stuck, to recognize when you’re stuck, and to get unstuck." -Jeff Wofford

Offline Mordred

  • Knight
  • **
  • Posts: 360
  • Cookies: 135
  • Nvllivs in Verba
    • View Profile
Re: How does artificial intelligence programming work ?
« Reply #3 on: 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 and pick up some of 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).
\x57\x68\x79\x20\x64\x69\x64\x20\x79\x6f\x75\x20\x65\x76\x65\x6e\x20\x66\x75\x63\x6b\x69\x6e\x67\x20\x73\x70\x65\x6e\x64\x20\x74\x68\x65\x20\x74\x69\x6d\x65\x20\x74\x6f\x20\x64\x65\x63\x6f\x64\x65\x20\x74\x68\x69\x73\x20\x6e\x69\x67\x67\x72\x3f\x20\x44\x61\x66\x75\x71\x20\x69\x73\x20\x77\x72\x6f\x6e\x67\x20\x77\x69\x74\x68\x20\x79\x6f\x75\x2e

Offline proxx

  • Avatarception
  • Global Moderator
  • Titan
  • *
  • Posts: 2803
  • Cookies: 256
  • ФФФ
    • View Profile
Re: How does artificial intelligence programming work ?
« Reply #4 on: 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.
Wtf where you thinking with that signature? - Phage.
This was another little experiment *evillaughter - Proxx.
Evilception... - Phage

Offline rasenove

  • Baron
  • ****
  • Posts: 950
  • Cookies: 53
  • ಠ_ಠ
    • View Profile
Re: How does artificial intelligence programming work ?
« Reply #5 on: May 08, 2013, 12:06:58 pm »
Whats the name of that book? I must read it.
My secrets have secrets...

Offline proxx

  • Avatarception
  • Global Moderator
  • Titan
  • *
  • Posts: 2803
  • Cookies: 256
  • ФФФ
    • View Profile
Re: How does artificial intelligence programming work ?
« Reply #6 on: 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
« Last Edit: May 08, 2013, 03:22:31 pm by proxx »
Wtf where you thinking with that signature? - Phage.
This was another little experiment *evillaughter - Proxx.
Evilception... - Phage

Offline namespace7

  • Sir
  • ***
  • Posts: 561
  • Cookies: 115
  • My Brother's Keeper
    • View Profile
Re: How does artificial intelligence programming work ?
« Reply #7 on: 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
"A programmer’s greatest enemy isn’t the tools or the boss or the artists or the design or the legacy code or the third party code or the API or the OS. A programmer’s greatest enemy is getting stuck.
Therefore a crucial step to becoming a better programmer is learning how to avoid getting stuck, to recognize when you’re stuck, and to get unstuck." -Jeff Wofford

Offline bluechill

  • Cybermancer
  • Royal Highness
  • ****
  • Posts: 682
  • Cookies: 344
  • I am the existence in these walls
    • View Profile
Re: How does artificial intelligence programming work ?
« Reply #8 on: 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.
I have dreamed a dream, but now that dream has gone from me.  In its place now exists my own reality, a reality which I have created for myself by myself.

Offline hackias

  • /dev/null
  • *
  • Posts: 10
  • Cookies: 0
    • View Profile
Re: How does artificial intelligence programming work ?
« Reply #9 on: 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).

 

Offline bluechill

  • Cybermancer
  • Royal Highness
  • ****
  • Posts: 682
  • Cookies: 344
  • I am the existence in these walls
    • View Profile
Re: How does artificial intelligence programming work ?
« Reply #10 on: 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
I have dreamed a dream, but now that dream has gone from me.  In its place now exists my own reality, a reality which I have created for myself by myself.

Offline chapp

  • Peasant
  • *
  • Posts: 87
  • Cookies: 2
    • View Profile
Re: How does artificial intelligence programming work ?
« Reply #11 on: 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"