Is possible to modify the AI of the actors?

Post » Sat Dec 07, 2013 4:53 am

Hi guys,

i just started to learn about modding with the Creation Kit and im little lost about the possibilities that it will offer to the users. Im looking for a university project about AI improvement by genetic algorithms. Im trying to discover if using the Creation Kit, Papyrus scripting or maybe helping me with SKES i can modify directly, for example, the behaviour of the actors in combat or the AI of the followers, and also if this is a hard thing to make it possible.

Maybe is a noob question, but i have to know this clearly in order to present this idea to my teacher university in a few days and maybe someone of you that have more experience on this could help me to solve this questions.. im managing a lot of project alternatives right now and im very limited by the time..

Thank you so much, ill appreciate all the help.

User avatar
quinnnn
 
Posts: 3503
Joined: Sat Mar 03, 2007 1:11 pm

Post » Sat Dec 07, 2013 5:06 am

I suspect that this would be a very hard project to get enough clarity on in a few days to make a reasonable presentation.

The AI for NPCs is controlled partly by hard-coded behaviour (also known as procedures) and conditional trees of procedures (known as packages).

Packages can be set up in the CK, which allows you to define both the tree structure, the conditions on the branches and leaves (within strict limits) and the parameters passed to the procedures.

However, as powerful as this is, there is no simple way of defining these structures by way of an external program (which you'd need to make use of genetic algorithms). I'm pretty sure there's little or no way in Papyrus of achieving much AI package manipulation - maybe changing some global variables that influence procedures across the board (which wouldn't help you at all) but not much else. You'd have to, probably, write your own code to patch modifications of existing packages into a dummy .esp file - that would require an extremely in-depth knowledge of the .esp format, and a great deal of demanding code design, engineering and testing. Not impossible, but very, very time consuming.

The other problem would be assessing the results and feeding them back in a sensible way into your genetic algorithm, to act as a selector on your population. Simple NPC survival might be one way of doing it, but you could easily just select for NPCs with completely broken AI which never leave the safety of their homes. Assessing how realistic and convincing their behaviour is would, I'm afraid, require perhaps hundreds of hours just watching NPCs behaving with various degrees of imbecility, recording the least broken, then manually feeding the results into your genetic algorithm code.

The final issue is that it is very, very easy to create AI packages that just leave NPCs rooted to the spot, and very hard to create packages that have them doing something sensible - unless you just rely on the hard-coded 'sandbox' procedure, which isn't really much of a success for a genetic algorithm.

I'm afraid that even the developers of TESVEdit, who know about everything the community does know about the .esp format and how to manipulate it, might go a little pale at the thought of a project like this. However, if you do want concrete information about the possibility of generating partly or completely randomised AI packages and inserting them into a dummy .esp, those would be the folk to ask.

Sorry to rain on your parade :(. I don't want to just squash what is a very ingenious idea, but at least if you go forward with your eyes open you'll be able to plan for problems that might arise.

User avatar
Roberta Obrien
 
Posts: 3499
Joined: Tue Oct 23, 2007 1:43 pm

Post » Sat Dec 07, 2013 7:30 am

Amazing response andyw, really thank so much for clarify all my questions, that help me a lot :)

I fancied an answer like this and yes, for sure is a very interesting way to investigate it, but they give me limited time and resources so i cant afford to do it. I think that even if i could perform correctly the genetic algorithm, the huge time to simulate and obtain the results for the genetic cicle could take weeks (or months..) of execution to improve the AI only a little (maybe nothing). I wanted to work with a fresh game like Skyrim for the project, but i think i should do a reality check and look for old and more basic games if i want to see better results and not fail in the middle of the way..

Again, thank so much for the help.

User avatar
Suzie Dalziel
 
Posts: 3443
Joined: Thu Jun 15, 2006 8:19 pm


Return to V - Skyrim