Archived

This topic is now archived and is closed to further replies.

Zols

schoolwork...

Recommended Posts

im sorry but i need a little help with a thing. I have to do a school work about A.I. and i gonna program something easy to show what its all about. but i have very hard so find an rather easy example wich uses some kind of AI. do you guys have a tip? something not very hard but uses AI in some way. I thought about a "three in a line game" or tic tac toe, but someone told me that had nothing to do with A.I. can you program a "three in a line game" with AI? Zols

Share this post


Link to post
Share on other sites
It depends how you implement it, if you have a game
of tic tac toe and your 'ai' simply randomly places X's or O's
thats not really an example of intelligence, the basis, i think,
of AI in games is to make it seem intelligent, and if you
manage to do that, the user cannot distinguish between
actual intelligence and artificial. If you make a tic tac toe
game and evaluate the board every move of the player you
can make the AI section of your game act in such a way
that it shows intelligence by trying to either block you or
make a complete row. I hope that makes sense.

[EDIT] only just woken up properly

Edited by - zanthos on January 30, 2002 7:10:21 AM

Share this post


Link to post
Share on other sites
You could also just do an implementation of A*... Its probably easier, even though I''m not sure if its the sort of AI your looking for.

Share this post


Link to post
Share on other sites
I have a connect 4 game assignment as a homework in C++.

for the beginning how do I check for a winner, in a simple way.

I think it could be done with AI. but I am not sure.

Share this post


Link to post
Share on other sites

I''ve been doing the same thing, a connect 4-in-a-row-game.

Check for winner:
Loop through every cell in the game (beginning down-left)
and check if there are 3 same pieces above, besides, or diagonal. That wasn''t so hard ? You don''t really need ai for this.

edo

Share this post


Link to post
Share on other sites
Zols,

It would be best for you to stick with something easy as your first AI project. Pathfinding isn''t AI but rather search. Search has been used as a basis for AI systems, but not AI in and of itself.

My suggestion would be for you to code a very simple Finite State Machine. These can display a range of behaviours from simple to complex but all of the intelligence is provided by the programmer/designer. This is okay though, as this is how most game AI is done!

For each state you need to define what happens in that state and under what circumstances the system leaves that state. Which other state the system traverses to will depend on the circumstances you define. You may choose to make it impossible to get to every other state from a particular state as well.

You should be able to find plenty of articles about Finite State Machines on the web. You can start by clicking on the ''Articles & Resources'' link at the top of this page and going to the AI section.

Good luck,

Timkin

Share this post


Link to post
Share on other sites

Alex,

has Connect-4 also been solved when you play with a field of say
23 by 15? Also a little comment that might not be in place here, but: I thought I would liked your article about Expert Systems, but I did not explain one little technical bit about Expert Systems, I still don''t have any clue on how to code them or which principles they use...

Love your site though...

Edo

Share this post


Link to post
Share on other sites