Author Topic: Artificial Intelligence and D&D optimization  (Read 20757 times)

0 Members and 1 Guest are viewing this topic.

Dictum Mortuum

  • Hong Kong
  • ****
  • Posts: 1160
  • always female suspects
    • Email
Artificial Intelligence and D&D optimization
« on: July 22, 2009, 10:57:23 AM »
An artificial neural network (NN) is a mathematical model of the biological neural network, which is, put simple, the way our brain works.

NNs have been used to solve optimization problems before and have numerous appliances. However they give results in a unique way. They don't work like algorithms (or heuristics for that matter), but they require to be trained with a set of solved problems (a subset of the problems the neural network is intended for) and then, after the training is done, can solve any problem of the general set, with an amount of error. The error can be minimized if we choose the network's architecture carefully.

This, applied to D&D could mean that we train the network with a number of highly optimized builds the CO has spawned. Afterwards, we can input variables such as the level of our character, if we want him to be a primary spellcaster or not, etc and get as a result an optimized character.

Of course, this is a very difficult and demanding job, but we could break the problem into pieces (feat selection, skill rank placement, etc).

What do you think?
Dictum Mortuum's Handbooks: My personal character optimization blog.


Midnight_v

  • Organ Grinder
  • *****
  • Posts: 2660
  • Dulce et decorum est pro alea mori.
Re: Artificial Intelligence and D&D optimization
« Reply #1 on: July 22, 2009, 11:46:09 AM »
I think... your optimization level has gone too far.

Someone stop Dictum Mortuum! He's trying to optimize optimizing! (though he's been up to that a while now that I stop to think of it.)  :lol
\\\"Disentegrate.\\\" \\\"Gust of wind.\\\" \\\"Now Can we PLEASE resume saving the world?\\\"

Dictum Mortuum

  • Hong Kong
  • ****
  • Posts: 1160
  • always female suspects
    • Email
Re: Artificial Intelligence and D&D optimization
« Reply #2 on: July 22, 2009, 01:08:49 PM »
I think... your optimization level has gone too far.

Someone stop Dictum Mortuum! He's trying to optimize optimizing! (though he's been up to that a while now that I stop to think of it.)  :lol

Actually this is optimizing without knowing what you are actually optimizing. But the result will be optimized.
:p
Dictum Mortuum's Handbooks: My personal character optimization blog.


Suzerain

  • Bi-Curious George
  • ****
  • Posts: 523
  • is on extended leave
Re: Artificial Intelligence and D&D optimization
« Reply #3 on: July 22, 2009, 02:32:09 PM »
The application of this technique to a problem as complex as d&d optimization could be the subject of a master's thesis, I think.

The primary problem would be to design the evaluation (cost) function, I think. I'm pretty sure melee damage (complex as it is) can be calculated. Other criteria could be any of the statistics of a build, HP, AC, saves, highest level of spells, type of spell list, ... I'm not sure whether any of this helps though since the most complex problem we've done in class was the traveling salesman problem. I don't even know where to start.

edit: Or.. we could randomly generate a large data set of legal builds and then judge whether they're good or not and feed the machine with it. Which, I'm slowly realizing, is probably what you wanted to do.
« Last Edit: July 22, 2009, 02:45:06 PM by Suzerain »

Soda

  • Bi-Curious George
  • ****
  • Posts: 484
Re: Artificial Intelligence and D&D optimization
« Reply #4 on: July 22, 2009, 02:48:16 PM »
"Skynet begins to learn at a geometric rate. It becomes self-aware at 2:14 a.m. Eastern time, August 29th. At 2:15, it begins rolling up characters."

BowenSilverclaw

  • Organ Grinder
  • *****
  • Posts: 5337
  • Walking that fine line between genius and insanity
    • Email
Re: Artificial Intelligence and D&D optimization
« Reply #5 on: July 22, 2009, 02:56:54 PM »
"Skynet begins to learn at a geometric rate. It becomes self-aware at 2:14 a.m. Eastern time, August 29th. At 2:15, it begins rolling up characters."
:lol



:clap
Good one :D
"Weakness? Come test thy mettle against me, hairless ape, and we shall know who is weak!"

Quote from: J0lt
You caught a fish.  It was awesome.   :lol

juton

  • King Kong
  • ****
  • Posts: 809
  • Jack of all trades, master of nothing.
    • Email
Re: Artificial Intelligence and D&D optimization
« Reply #6 on: July 22, 2009, 03:08:37 PM »
Actually, my Master's Thesis involves ANNs, and this sounds as complicated or more so. The only way I think this could work is if the ANN could be trained by actually playing D&D. You could make it do combat, but making it smart enough to use contact other plane or other non-combat spells requires a human level of intelligence. If you are not considering out of combat activities you can optimize with just math.

Kuroimaken

  • Organ Grinder
  • *****
  • Posts: 6733
Re: Artificial Intelligence and D&D optimization
« Reply #7 on: July 22, 2009, 03:17:50 PM »
This looks almost too awesome to be true.

Shame I can't really help, since my experience with math and programming is practically zero.
Gendou Ikari is basically Gregory House in Kaminashades. This is FACT.

For proof, look here:

http://www.layoutjelly.com/image_27/gendo_ikari/

[SPOILER]
Which Final Fantasy Character Are You?
Final Fantasy 7
My Unitarian Jihad Name is: Brother Katana of Enlightenment.
Get yours.[/SPOILER]

I HAVE BROKEN THE 69 INTERNETS BARRIER!


BowenSilverclaw

  • Organ Grinder
  • *****
  • Posts: 5337
  • Walking that fine line between genius and insanity
    • Email
Re: Artificial Intelligence and D&D optimization
« Reply #8 on: July 22, 2009, 03:19:18 PM »
Shame I can't really help, since my experience with math and programming is practically zero.
Same here.
"Weakness? Come test thy mettle against me, hairless ape, and we shall know who is weak!"

Quote from: J0lt
You caught a fish.  It was awesome.   :lol

Kuroimaken

  • Organ Grinder
  • *****
  • Posts: 6733
Re: Artificial Intelligence and D&D optimization
« Reply #9 on: July 22, 2009, 03:26:17 PM »
Hmmm. Say, if the best way to get the artificial intelligence going is to make it actually play D&D, we COULD start by hooking it up to a copy of Neverwinter Nights for starters.

Granted, we'd have to modify it (heavily), and it would only really help as a starting point... but at least it's a starting point.
Gendou Ikari is basically Gregory House in Kaminashades. This is FACT.

For proof, look here:

http://www.layoutjelly.com/image_27/gendo_ikari/

[SPOILER]
Which Final Fantasy Character Are You?
Final Fantasy 7
My Unitarian Jihad Name is: Brother Katana of Enlightenment.
Get yours.[/SPOILER]

I HAVE BROKEN THE 69 INTERNETS BARRIER!


juton

  • King Kong
  • ****
  • Posts: 809
  • Jack of all trades, master of nothing.
    • Email
Re: Artificial Intelligence and D&D optimization
« Reply #10 on: July 22, 2009, 04:08:20 PM »
Hmmm. Say, if the best way to get the artificial intelligence going is to make it actually play D&D, we COULD start by hooking it up to a copy of Neverwinter Nights for starters.

Granted, we'd have to modify it (heavily), and it would only really help as a starting point... but at least it's a starting point.

That's a good idea, if you where actually going to attempt this, this is where you'd start. But does NWN do a good enough job of simulating D&D, I don't think either version has staple spells like Fly. They may have changed other essential spells like scry and teleport, you also can't shapechange into a Dire Tortoise. I think it would be possible, but labour intensive to build an AI that is very good at playing NWN, but I don't think it would be very illuminating with regards to real D&D because real D&D has so many more options available than NWN.

Bozwevial

  • Organ Grinder
  • *****
  • Posts: 4497
  • Developing a relaxed attitude to danger.
Re: Artificial Intelligence and D&D optimization
« Reply #11 on: July 22, 2009, 04:19:19 PM »
Hmmm. Say, if the best way to get the artificial intelligence going is to make it actually play D&D, we COULD start by hooking it up to a copy of Neverwinter Nights for starters.

Granted, we'd have to modify it (heavily), and it would only really help as a starting point... but at least it's a starting point.

That's a good idea, if you where actually going to attempt this, this is where you'd start. But does NWN do a good enough job of simulating D&D, I don't think either version has staple spells like Fly. They may have changed other essential spells like scry and teleport, you also can't shapechange into a Dire Tortoise. I think it would be possible, but labour intensive to build an AI that is very good at playing NWN, but I don't think it would be very illuminating with regards to real D&D because real D&D has so many more options available than NWN.

Seconded. I have little experience with NWN2, but the original has no scrying/teleportation spells, nor does it have Fly. Some of the more creative optimization techniques may remain beyond a computer's reach, but it can certainly draw on previously discovered builds and tactics.

Rebel7284

  • Grape ape
  • *****
  • Posts: 1585
Re: Artificial Intelligence and D&D optimization
« Reply #12 on: July 22, 2009, 04:34:51 PM »
*sigh* I wish I had more time to work on awesome projects like this.  Stupid 9-6 job.  What language are you thinking of employing?  C++ may be the fastest and familiar to more people but it's a bitch to maintain and debug in my experience.  Java is also familiar and nowadays almost as fast.  PHP, Perl, Python have really easy learning curves but are slow as hell. 

We also run into issues with some aspects of the game being very difficult to optimize.  We also run into issues with computers being too slow to do this well.
Negative level on a chicken would make it a wight the next day.  Chicken the other wight meat. -borg286

Sinfire Titan

  • Organ Grinder
  • *****
  • Posts: 5697
  • You've got one round to give a rat's ass.
    • Email
Re: Artificial Intelligence and D&D optimization
« Reply #13 on: July 22, 2009, 04:44:53 PM »
"Skynet begins to learn at a geometric rate. It becomes self-aware at 2:14 a.m. Eastern time, August 29th. At 2:15, it begins rolling up characters."

Obligatory RT link.


[spoiler][/spoiler]

Kuroimaken

  • Organ Grinder
  • *****
  • Posts: 6733
Re: Artificial Intelligence and D&D optimization
« Reply #14 on: July 22, 2009, 06:20:01 PM »
Hmmm. Say, if the best way to get the artificial intelligence going is to make it actually play D&D, we COULD start by hooking it up to a copy of Neverwinter Nights for starters.

Granted, we'd have to modify it (heavily), and it would only really help as a starting point... but at least it's a starting point.

That's a good idea, if you where actually going to attempt this, this is where you'd start. But does NWN do a good enough job of simulating D&D, I don't think either version has staple spells like Fly. They may have changed other essential spells like scry and teleport, you also can't shapechange into a Dire Tortoise. I think it would be possible, but labour intensive to build an AI that is very good at playing NWN, but I don't think it would be very illuminating with regards to real D&D because real D&D has so many more options available than NWN.

I'm not saying it does. It's just the closest we have to a digital D&D environment we can put a computer to play in. Like I said, modding would be required.
Gendou Ikari is basically Gregory House in Kaminashades. This is FACT.

For proof, look here:

http://www.layoutjelly.com/image_27/gendo_ikari/

[SPOILER]
Which Final Fantasy Character Are You?
Final Fantasy 7
My Unitarian Jihad Name is: Brother Katana of Enlightenment.
Get yours.[/SPOILER]

I HAVE BROKEN THE 69 INTERNETS BARRIER!


The_Mad_Linguist

  • Organ Grinder
  • *****
  • Posts: 8780
  • Simulated Thing
Re: Artificial Intelligence and D&D optimization
« Reply #15 on: July 22, 2009, 06:23:24 PM »
For building characters, it'd be pretty easy to consistently come out with optimized output using a simple algorithm.


I'd imagine that druid 20s would get boring after a while, though.
Linguist, Mad, Unique, none of these things am I
My custom class: The Priest of the Unseen Host
Planetouched Handbook
Want to improve your character?  Then die.

Midnight_v

  • Organ Grinder
  • *****
  • Posts: 2660
  • Dulce et decorum est pro alea mori.
Re: Artificial Intelligence and D&D optimization
« Reply #16 on: July 22, 2009, 06:26:29 PM »
So much win in the above statment... I wish we still had gamer fu to give.  :lol
\\\"Disentegrate.\\\" \\\"Gust of wind.\\\" \\\"Now Can we PLEASE resume saving the world?\\\"

dither

  • Hong Kong
  • ****
  • Posts: 1413
  • Breaking the ninth wall
Re: Artificial Intelligence and D&D optimization
« Reply #17 on: July 22, 2009, 06:54:06 PM »
For building characters, it'd be pretty easy to consistently come out with optimized output using a simple algorithm.

It would be nice if we had the program capable of determining what the average "best" optimization was for each level at play so that 3.x could be rebuilt to meet those standards. Imagine if the computer could spit out what a character SHOULD be able to do at 6th level, we could eliminate all the terrible classes that fail to meet the criteria. We then build a game where classes are balanced and versatile?
"Stuck between a rogue and a bard place."

vanity
Read my webcomic!
Dither's Amazing Changing Avatars

[spoiler]
Quote from: Shadowhunter
Quote from: Flay Crimsonwind
"Vegeta! What does the scouter say about Dither's power level?"
It's over nine thousand!

Quote from: Bauglir
Quote from: Anklebite
Quote from: dither
Well blow me down! :P
A SECTION OF THE CAVERN HAS COLLAPSED!
dither, Miner, has died after colliding with an obstacle!
[/spoiler]

juton

  • King Kong
  • ****
  • Posts: 809
  • Jack of all trades, master of nothing.
    • Email
Re: Artificial Intelligence and D&D optimization
« Reply #18 on: July 22, 2009, 08:30:39 PM »
For building characters, it'd be pretty easy to consistently come out with optimized output using a simple algorithm.

It would be nice if we had the program capable of determining what the average "best" optimization was for each level at play so that 3.x could be rebuilt to meet those standards. Imagine if the computer could spit out what a character SHOULD be able to do at 6th level, we could eliminate all the terrible classes that fail to meet the criteria. We then build a game where classes are balanced and versatile?

As unsexy as it may sound, we do this already with trial and error. We trade experiences and because of that we can make up things like the Tier system, which can tell use how powerful and how versatile a class is. If you wanted to make sure your character stacks up at a particular level there was a post on 339 called 'Optimization by the Numbers' which gives the average saves, hp and other stats for creatures in the SRD by CR.

Rebel7284

  • Grape ape
  • *****
  • Posts: 1585
Re: Artificial Intelligence and D&D optimization
« Reply #19 on: July 22, 2009, 08:32:29 PM »
As unsexy as it may sound, we do this already with trial and error. We trade experiences and because of that we can make up things like the Tier system, which can tell use how powerful and how versatile a class is. If you wanted to make sure your character stacks up at a particular level there was a post on 339 called 'Optimization by the Numbers' which gives the average saves, hp and other stats for creatures in the SRD by CR.

Yes but this is time consuming.  Computers are made to make our work easier.  :)
Negative level on a chicken would make it a wight the next day.  Chicken the other wight meat. -borg286