Jump to content
  • Advertisement
Sign in to follow this  
bronxbomber92

Tron AI

This topic is 3646 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi I don't know much about AI (genetic algorithms, neural networks, A*, ect..), but I'm responsible for writing an AI for a Tron-like game. I could probably create something that is usable, but it wouldn't be very adaptable nor flexible (different degrees of possible intelligence). What you you guys suggest I look into to create such a system? Thanks!

Share this post


Link to post
Share on other sites
Advertisement
Step 1) Never say "neural network" or "genetic algorithm" again.
Step 2) You don't design AI by selecting a method. You design AI by identifying one problem at a time and proposing a solution for that single problem.

For the most basic issues, you will likely start with a simple finite state machine. However, until you present a game behavior-specific problem, there is no solution that can be offered.

Share this post


Link to post
Share on other sites
1.) Why? Just curious :)
2.) I'd like to arbitrarily switch between randomly going around as if the AI has no purpose (which should be easy I think) and the AI trying to cut off the path off the player. Sorry for being vague.

Share this post


Link to post
Share on other sites
So you just want the enemy to travel in a vector in the direction of the player? You can just subtract the locations of the player and enemy to get a vector pointing from the enemy to the player and then have the enemy move in that direction.

Share this post


Link to post
Share on other sites
@SiCrane, Lightcycles
@mikesobczak, that works for getting a direction, but most likely it'll be obstructed by a trail of some sort so it needs to find the quickest way there and the lightcycle can't just turn at any arbitrary degree :-). I think I'll give this a go myself over the weekend, then I'll come back here if I'm having troubles.

Thanks guys.

Share this post


Link to post
Share on other sites
Sounds easy enough to me. The playing field is just a large square and divided as a grid. You just make sure your player isn't going around in a inner circle other wise it gets trapped. Of course, sometimes you can make it go around in circles so that it dies and the user gets a point.
That would be good enough for the beginner mode.

Share this post


Link to post
Share on other sites
Are you lightcycles going to move over a grid o freely?
I'm not talking about if the movement will be orthogonal or not. Only if there will be 'infinites' parallel lines like in gltron.

Share this post


Link to post
Share on other sites
you can start with the simplest AI like:

1) go in direction X unless its blocked, if its block change direction using (3)
2) change direction X every random() number of steps using (3)
3) the direction choosing strategy will be: choose using random() and avoid crushing if possible.

---
I think this will be very easy to program and provide a fun enemy, though maybe not very challenging.


you can make a smarter algorithm with the direction choosing strategy,

for example score every direction based on if it leads to a if it crosses player path, if it turns into large area or small area, if it locks the player in a small area, etc... choose direction with highest score.


Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!