Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 computer ai
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
dejan




PostPosted: Mon May 16, 2005 8:22 pm   Post subject: computer ai

does anybody know how to write a computer ai for a racing game that has a scrolling map. If so can you share
Sponsor
Sponsor
Sponsor
sponsor
Delos




PostPosted: Mon May 16, 2005 8:28 pm   Post subject: (No subject)

Your question begs the question:
"Just what, pray tell, is 'computer ai for a racing game'?"

AI, for what Turing can handle, is not much more than a series of well constructed conditional statements. More if it's really elaborate. What you may be thinking of is how a computer could control a 'player' in a 'racing game'.
This is little more than having conditions that set the position of the 'player's' 'race car' at various time intervals, in accordance with the limits imposed by the 'race track'.
You'll notice the quotations. Those are simply to imply that these objects are not really 'cars' or such, but ordered sets of variables and associated functions.
Don't be scared by the big words. All I'm saying is define for yourself exactly what you want your 'AI' to do, and then rewrite that in programming terms.
Notoroge




PostPosted: Mon May 16, 2005 8:41 pm   Post subject: (No subject)

Computers don't think. AI = The simulation of intelligence. Making something appear as though it is thinking, when really it is not.

I think you think there is some kind of elaborate programming structure that can magically make a car move as though it is thinking. But the problem is that since every program is made differently, AI is going to be coded differently and for different purposes.

AI 'for a racing game', is essentially a long segment of statements as,

"if rock ahead, steer right."
"if player1 beside me, use NOS"


etc...

The trick is in making the AI react as humanly as possible to any situation. I believe in quake that would be called, "Nightmare!" mode. Razz
StarGateSG-1




PostPosted: Tue May 17, 2005 11:09 am   Post subject: (No subject)

Before you add or even consider AI make the game for just human players and work from there. Use testing to see what real humans players would do in a situation them emulate that in turing.
You can't jump the gun wiht AI is is the hardest thing to get working well, and you need to a working game the first few times until you understand the concepts.
MysticVegeta




PostPosted: Wed May 18, 2005 3:24 pm   Post subject: (No subject)

Here is a basic concept of AI, formed using couple of "if" structures.
code:
var replies : array 1 .. 5 of string := init ("What ever...", "I didnt quite get that", "BOW BEFORE ME!", "m3 t3h in54n3", "What the hell what that?!")
var rep : string
loop
    put "Please enter a comment/reply:"
    get rep : *
    if index (rep, "suck") > 0 then
        put "NO YOU SUCK"
    elsif index (rep, "i") > 0 or index (rep, "I") > 0 then
        put "naww. you are just dumb"
    elsif index (rep, "you") > 0 then
        put "Nah.. I am just better than you ;)"
    else
        put replies (Rand.Int (1, 5))
    end if
    put ""
end loop
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 5 Posts ]
Jump to:   


Style:  
Search: