Link to home
Start Free TrialLog in
Avatar of cartti
cartti

asked on

Artificial Intelligence

I know this is a general computing question, but does anyone  know of any VB code that enables the computer possess artificial intelligence. For example, a Connect Four computer player. Please include an explanation on the general concept when designing applications/ games which allow the computer to mimick human intelligence.

Your expert advice will be justly awarded.
Avatar of Mirkwood
Mirkwood

Look for the alphabeta algorithm.
That is a algorithm for 2 player games.
It basically uses brute force but ignores all stupid moves.
I have an application I wrote for Tic Tac Toe, but it is not artificial intelligence.  It is brute force (which I would also assume is the case for connect four).
AI is much more than just the ability to play (and win) a game.  The software would have to be able to play, lose, and then *learn* from that loss.
Even "Deep Blue" is not artificial intelligence.  When it plays chess, "Deep Blue" compares the layout of the chess board with it's internal database which also contains the next move for that particular layout.  There is no learning involved.

Just a few thoughts on the matter.
There was an article in "Scientific American" many years ago where you to "teach" match boxes to play tic-tac-toe and *win*. You would label the top of each match box with a given position in the game and place a response on the bottom. Add several beads into the box and you're ready to train. As you play, pick up at random any box showing the current position when it's the boxes turn to play. Make the move indicated on the bottom. Keep all of the boxes for a given game separate as they are used. If the boxes lead to a win, add a bead. If the boxes lose, remove a bead from each. If any box runs out of beads toss it out of the pool - it has a "losing" strategy. After enough trials the boxes that were left would play and *win*.

Problem like this can be computerized, but as number of possibilities expands the data *explodes*!

M

ASKER CERTIFIED SOLUTION
Avatar of kswinney
kswinney

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I also implemented the "Proximity" function for doing string comparisons. This is a function that compares strings for the property of "nearness". It returns a weighted result 0-1 with 0 being no match and 1 being a perfect match. It was able to pair up misspelled names and give a "confidence" in it's decision based on the Nearness result. It would correctly pair up transposed letters, single dropped or added letters, missing middle initials and even mated up STEPHENS and STEVENS. Pretty cool. This algorithm was implemented in *hardware*  back in the 80's.

None of these techniques are "AI" per se, but all are methods of incorporating AI into your code.

M

Buy the thesis of Victor Allis. He is man that proved that Connect -4 can always be won by the player that starts.

http://www.cs.vu.nl/~victor/thesis.html

I used his algorithms in my master thesis and the book is very good.
Avatar of cartti

ASKER

Thanks everyone for your help. It would be nice to be able to split the points, but I don't know how. I'll post any further developments into this topic should I find anything new about the subject.
Avatar of cartti

ASKER

Thanks everyone for your help. It would be nice to be able to split the points, but I don't know how. I'll post any further developments into this topic should I find anything new about the subject.
Avatar of cartti

ASKER

Thanks everyone for your help. It would be nice to be able to split the points, but I don't know how. I'll post any further developments into this topic should I find anything new about the subject.
One excellent depiction of a "thinking process" is depicted in a recent game I saw demonstrated called Creatures 2.  

Within it depicts several sections of the brain working together.  There are groupings of inputs which are used to determine the next action.  First the largest collection of objects is actual objects a very large array.  Then there is a collection of other factors such as mood/personality whatever.  

As things are acted upon the results are reviewed for results.  The results create links between objects and actions which are scored for good or poor results.  Touching a hot stove with any mood would be given a very poor (red link) link while Eating From hot stove might result is a very high scoring link (green link) especially if the mood was hungry does that make sense?

Complex topics like Chess would require a completely separate program which is not in the realm of basic AI but (activating the chess module) playing chess itself might be a green link if mood was bored and a red link if mood was hungry.