SINI AI

Talk about making games.

SINI AI

Postby Troodon » Sun Nov 12, 2006 7:11 pm

Hi,
I'm trying to make artificial intelligence but I have some problems. Currently SINI (my AI project) can solve basic labyrints but it can be cheated very easily. I tried to make it so that it remembers the wall collisions but that just made the labyrints more difficult for SINI. I will try again some things (for example picking a new way in collision from a specified side). Has anyone good hints? :wink:
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score

Random direction

Postby Troodon » Mon Nov 13, 2006 3:36 pm

Hey, the SINI has moveto candy in draw actor and I'm using 1.3.3 version of GE. How can I make in timer:
-create timer2
-moveto random direction by forgetting the candy moveto in the draw actor
When the timer2 ends:
-forget the random direction
-keep moving towards the candy
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score

Postby Troodon » Thu Nov 16, 2006 4:22 pm

No one can help me? :roll:
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score

Postby Troodon » Thu Nov 23, 2006 2:30 pm

Hi again,
I solved that problem already myself. Currently I'm needing a simple code to make this:

Four actors fly in four directions. After every actor has collided, the main actor goes to the direction where the farest actor collided.
Could somebody help?
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score

Postby Novice » Thu Nov 23, 2006 7:07 pm

Create an array lets call it "dir" with 4 slots.
On collision each actor stores it's distance from the main actor in one of the slots.
When the main actor begins to move, use a multiple if statement to check which distance is the highest and move the actor accordingly. Like this
Code: Select all
if (dir[0]>dir[1]&&dir[0]>dir[2]&&dir[0]>dir[3])
//move in the desired direction
else if (dir[1]>dir[0]....
//you get the point

This could be done in different ways but i cant think of any now except using the max function and pointers but that would be over complicating.
Why do i always get stuck?
User avatar
Novice
 
Posts: 399
Joined: Mon Aug 29, 2005 10:54 am
Location: Relative
Score: 5 Give a positive score

Postby Troodon » Fri Nov 24, 2006 7:42 am

Thanks Novice!! You've got new avatar! :D

I will try the system you told but I've never used directories in GE. Only in one tutorial. How do I make dir? In the variables thing? And how can I make slots? :wink:
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest