Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 2 [3]

Author Topic: Dwarf Fortress AI  (Read 8455 times)

Naz

  • Bay Watcher
    • View Profile
Re: Dwarf Fortress AI
« Reply #30 on: May 19, 2011, 01:45:13 pm »

And yet, you're curious.  You want to see the vile atrocities that could be generated from the otherwise simple program.  How many lines of code does it take before it's deemed unholy, and accepted as a member of the DF community?

Given the complexity of DF and therefore the complexity of an AI designed to play it, how long before it becomes self aware and becomes a forum troll version of skynet...

I know precisely squat about programming beyond a couple comp sci classes which resulted in database indexers that didn't do much but swear at the user. I'm really just posting because this sounds awesome and I want to keep an eye on it.
Logged
Urist McDwarf cancels wear pants: Just because

KojaK

  • Bay Watcher
  • KojaK cancels job: interrupted by Dwarf Fortress
    • View Profile
Re: Dwarf Fortress AI
« Reply #31 on: May 19, 2011, 03:44:39 pm »

So I think it's time I mentioned that I won't exactly be releasing any code for my AI out to the internet, sadly. But, that doesn't mean I won't release this project.

See, I'm structuring this program like a biological nervous system: nerves relay information to the central system, which controls its environment by sending signals to other nerves. I'll write various programs that act like nerves, to the point of literally even sending a pain signal. One nerve will watch over various aspects of the program's needs, which will in this case be represented by DF and the food and booze supplies. The program will solve the problem of not having any food by sending signals to another nerve to schedule jobs that produce food and booze. I'll build on this as I go along, with sensory nerves that relay information about the DF world, etc, etc.

Before I can write up the AI though, I have to give it a system to work with: the nerves. So this project is all about writing the nerves for my AI. Once the nerves are finished, I'll write up an automation script and a GUI and release it for you guys for fortress automation, seeing as how a full AI isn't exactly necessary or practical.

And yes. It will play with magma. Not just because of it's many economic and practical benefits, but because what is Dwarf Fortress without magma!?
Logged
Quote from: Airpi
A normal ballista does damage by piercing with overlarge arrows, a dwarven ballista does damage by crushing with entire trees.

They will run, naked, into the caverns and roll around in whatever nearby filth is available.  Watch for gory explosions.

Reelyanoob

  • Bay Watcher
    • View Profile
Re: Dwarf Fortress AI
« Reply #32 on: May 19, 2011, 04:01:57 pm »

Don't hard-code too much in the structure.

Load the specifics from text files, have the linkages be scriptable data too.

You want to be coding at the level of 'what is a nerve', 'what data is common to a nerve', 'how can i express the input and output linkages to Dwarf fortress in a tokenizable format in a loaded data structure'. The actual memory addresses and DFhack specific stuff should be just in the code though. Put all the known DFhack linkages in a table, and refer to them by index in the scripts (for super-coolness give each thing a token like in Dwarf Fortress, and pattern match these with your own script data).

Knowledge of object oriented programming is helpful here.
« Last Edit: May 19, 2011, 04:11:11 pm by Reelyanoob »
Logged
Pages: 1 2 [3]