Jump to content

Recommended Posts

I'm currently starting development of an AI that can play Don't Starve by itself. I'm hoping to do the key press generation/decision making in a higher level language (C++/Python) instead of overly liberal use of the standard Lua modding flow. I was wondering if there was a reasonable way to poll the state of the game. For example, if I could print (x,y) coordinates of trees/saplings/grass/etc, the player's hunger/sanity/health, the player's x,y position in relation to the world coordinates, current inventory etc to a file, I could read that file in Python and generate reasonable actions for the character to take. 

 

Any ideas?

This sounds very interesting. It sounds like you are trying to export the current status of a game into a file, and then have the AI read that. Does anyone know a good way to do this? Even just something like "getplayerposition" or "getplayerview"


This sounds very interesting. It sounds like you are trying to export the current status of a game into a file, and then have the AI read that. Does anyone know a good way to do this? Even just something like "getplayerposition" or "getplayerview"

@orisqu,

Wouldn't it just be easier to mod it in lua though? Doing it externally, you'd have to take into account details such as the fact that keypresses won't always respond accurately or consistently. The API has functions to walk towards an object, and, I think, functions to find near-by prefabs. 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...