Artificial Intelligence Depot
Visiting guest. Why not sign in?
News, knowledge and discussion for the AI enthusiast.
FEATURES COMMUNITY KNOWLEDGE SEARCH  
Developers, get involved!
The AI Foundry promotes the development of Open Source artificial intelligence projects. Why not join it now? All projects welcome extra help!
Visit the AI Foundry

Reply to Message

Not registered yet?

The AI Depot has a focused community of friendly users. Rather than let anyone abuse the site at the brink of promiscuity, we prefer to let only those with an active interest participate... this simply requires registering.

Why not sign up!

Joining the site's community is completely free. You can then post messages freely, and customise your personal profile at will. Specific privileges will also be granted to you, like being able to access printer-friendly articles without restrictions. So, why not register?

Username:
Password:
Subject:
Email me when someone replies.
Body:

Parent Message

Challenge for AI Gurus!

Hi there!

Assume you have a 2d array with dimensions (n,m) and one or more objects with a position (x,y) and a direction (dx,dy) which is always one of the following: (1,0), (-1,0), (0,1) or (0,-1). The array is initialized with 0 and all objects are alive (object.dead = false).

Now imagine there's a loop that always does the following:



The goal of each object is to stay alive as long as possible. What would be your approach for the object.compute_direction() function?

- flix

PS: sorry, I don't know how to post beautiful code here... =(

1 posts.
Tuesday 09 July, 13:50
Reply
Look Ahead

Hey flix, welcome to the boards.

How about using very simple planning... with only one action look ahead? Basically, pick an action, and if it seems like it'll kill you, pick another.

Now you can get even more complex by adding prediction. You also look an action ahead for each of the other entities within range. You can thereby check if the spot will be occupied next time.

Using this over and over for n actions as a search should provide good results for 2+ depths.

Does that help?

935 posts.
Monday 15 July, 15:21
Reply

Back to the Artificial Intelligence Depot.