Jump to content

Adding AI To Mids, Proof of Concept


Recommended Posts

With the ability to convert an AIToon to Mids format and save it off, I'm checking off as done the requirement of including relevant power effects, not just set bonuses, in the totals.  That leaves the ability to optimize for multiple values simultaneously as the only feature left to add to the proof of concept.  Here's how that will work:

 

  1. Start with a given build and a list of goals on what we want to improve. Each item in the goal list has a weight between 0.01 and 1.0 assigned to it. Higher numbers are more important.
  2. Make a random change to a power, multiplying the result by the weight assigned to that item (Mutation function).
  3. Repeat step 2 for each item in the goals list.
  4. Select the item from steps 2 and 3 that produced the highest change.
  5. If the change is closer to the goal than the original, keep the change, otherwise revert to the original (Fitness function).
  6. Repeat steps 2-5 ten times for the power.
  7. Do steps 2-6 for every power.
  8. Do steps 2-7 one hundred times. (100 generations).

 

A sample goals list might look like this:

 

Goal                           Weight

---------------------    --------

Smashing Defense     1.0

Psionc Resistance       0.9

Recovery                    0.5

Edited by magicjtv
Link to comment
Share on other sites

Just as a sanity check, I took a robotics/FF mastermind build of mine and fed it through the AI. The build was optimized by me for +Recovery bonuses. It had +160% Recovery.

 

The AI was able to boost that to 204%, a 44% increase over my hand-optimized build. And this was after I took out a few of the AI's optimizations to add procs I wanted.

 

Yeah, I think this is gonna work just fine.

Edited by magicjtv
  • Like 2
  • Thanks 1
Link to comment
Share on other sites

9 hours ago, magicjtv said:

Just as a sanity check, I took a robotics/FF mastermind build of mine and fed it through the AI. The build was optimized by me for +Recovery bonuses. It had +160% Recovery.

 

The AI was able to boost that to 204%, a 44% increase over my hand-optimized build. And this was after I took out a few of the AI's optimizations to add procs I wanted.

 

Yeah, I think this is gonna work just fine.

 

What was the trade-off?  Can it optimize multiple options simultaneously (select two, three, four or more bonuses to pursue)?  What about exclusions, such as "no purples" or "any set except this one"?  Is it named Magicjtv's Invention Set Specialization, Integrated Edition?

  • Like 1

Get busy living... or get busy dying.  That's goddamn right.

Link to comment
Share on other sites

45 minutes ago, Luminara said:

 

What was the trade-off?  Can it optimize multiple options simultaneously (select two, three, four or more bonuses to pursue)?  What about exclusions, such as "no purples" or "any set except this one"?  Is it named Magicjtv's Invention Set Specialization, Integrated Edition?

And actually, I typically select minimum values.   Like 45% smash/lethal defense, and then maximize something like recharge or resistance.

  • Like 1

Active on Excelsior:

Prismatic Monkey - Seismic / Martial Blaster, Shadow Dragon Monkey - Staff / Dark Brute, Murder Robot Monkey - Arachnos Night Widow

 

Link to comment
Share on other sites

On 4/15/2020 at 7:03 PM, magicjtv said:

As part of testing, I've created a csv file with all the bonuses for all the sets. I thought this may be useful for everyone who wants to find specific types of set bonuses, so I'm attaching the file here.

That CSV file is a thing of beauty, thank you very much. Do you have plans to update it with the enhancements that were added with i26p5 (unless I totally missed them being in there)?

  • Like 1
Link to comment
Share on other sites

20 hours ago, Luminara said:

 

What was the trade-off?  Can it optimize multiple options simultaneously (select two, three, four or more bonuses to pursue)?  What about exclusions, such as "no purples" or "any set except this one"?  Is it named Magicjtv's Invention Set Specialization, Integrated Edition?

There really weren't any trade offs. The AI just found stuff I missed.

 

Once I get the code working to simultaneously optimize multiple stats, i think the trade-offs will pop up. We'll see.

Edited by magicjtv
Link to comment
Share on other sites

11 hours ago, AboveTheChemist said:

That CSV file is a thing of beauty, thank you very much. Do you have plans to update it with the enhancements that were added with i26p5 (unless I totally missed them being in there)?

Thanks, I like it too.

 

It's produced by scanning te Mids database, so if there are things that are in Mids, but not in the csv, that means I have an older copy of Mids.

  • Thanks 1
Link to comment
Share on other sites

9 hours ago, magicjtv said:

Thanks, I like it too.

 

It's produced by scanning te Mids database, so if there are things that are in Mids, but not in the csv, that means I have an older copy of Mids.

That makes sense. I just updated my Mids and those enhancements are in there. The CSV naming convention seems straightforward though so if I need that data before you get a chance to update it, I can just add it in manually on my end. I have some vague notions of some fun things I could do with that data (aside from simple filters in Excel which are super handy in their own right) but that's a ways down the road at best. Anyway, I look forward to seeing how this project turns out! Thanks again!

  • Like 1
Link to comment
Share on other sites

Status Update.

  • Multi-optimize is complete.

Here's an example result that optimizes for smashing defense, psionic resistance, and recovery with weights of 1.0, 0.5, and 0.25, respectively.

 

Spoiler


Controller
=== Powersets ===
* Inherent Fitness
* Mind Control
* Force Field
* Speed
* Concealment
* Fighting
* Force of Will
* Primal Forces Mastery
=== Optimizations ===
Defense Smashing without PvP bonuses (Weight: 1) 
Resistance Psionic without PvP bonuses (Weight: 0.5) 
Recovery without PvP bonuses (Weight: 0.25) 
=== Powers ===
* Health (Slots: 4): Panacea Heal/EndRedux, Panacea Heal/Rchg, Miracle Heal/EndRdx, Miracle Heal/Rchg || Set Bonuses: Defense Smashing: 0 (Weighed: 0) Resistance Psionic: 0 (Weighed: 0) Recovery: 0.05 (Weighed: 0.0125) 
* Stamina (Slots: 6): Performance Shifter EndMod, Performance Shifter EndMod/Rchg, Performance Shifter EndMod/Acc/Rchg, Performance Shifter EndMod/Acc, Adrenal Adjustment EndMod, Adrenal Adjustment EndMod/Rchg || Set Bonuses: Defense Smashing: 0 (Weighed: 0) Resistance Psionic: 0 (Weighed: 0) Recovery: 0.035 (Weighed: 0.00875) 
* Mesmerize (Slots: 1): Acc || Set Bonuses: Defense Smashing: 0 (Weighed: 0) Resistance Psionic: 0 (Weighed: 0) Recovery: 0 (Weighed: 0) 
* Personal Force Field (Slots: 2): Kismet Def/EndRdx, Kismet Def/Rchg || Set Bonuses: Defense Smashing: 0 (Weighed: 0) Resistance Psionic: 0 (Weighed: 0) Recovery: 0.015 (Weighed: 0.00375) 
* Deflection Shield (Slots: 6): Gift of the Ancients Def/EndRdx, Gift of the Ancients Def/Rchg, Gift of the Ancients EndRdx/Rchg, Gift of the Ancients Def/EndRdx/Rchg, Gift of the Ancients Def, Gift of the Ancients Run+ || Set Bonuses: Defense Smashing: 0 (Weighed: 0) Resistance Psionic: 0.045 (Weighed: 0.0225) Recovery: 0.02 (Weighed: 0.005) 
* Levitate (Slots: 4): Ruin Acc/Dmg, Ruin Dmg/EndRdx, Far Strike Dmg/Rng, Far Strike Dmg/Rchg || Set Bonuses: Defense Smashing: 0 (Weighed: 0) Resistance Psionic: 0.03 (Weighed: 0.015) Recovery: 0 (Weighed: 0) 
* Dominate (Slots: 2): Essence of Curare Acc/Rchg, Essence of Curare EndRdx/Hold || Set Bonuses: Defense Smashing: 0 (Weighed: 0) Resistance Psionic: 0.015 (Weighed: 0.0075) Recovery: 0 (Weighed: 0) 
* Confuse (Slots: 2): Coercive Persuasion  Conf, Coercive Persuasion  Conf/Rchg || Set Bonuses: Defense Smashing: 0 (Weighed: 0) Resistance Psionic: 0 (Weighed: 0) Recovery: 0.04 (Weighed: 0.01) 
* Stealth (Slots: 6): Luck of the Gambler Def/EndRdx, Luck of the Gambler Def/Rchg, Luck of the Gambler EndRdx/Rchg, Luck of the Gambler Def/EndRdx/Rchg, Luck of the Gambler Def, Luck of the Gambler Def/Rchg+ || Set Bonuses: Defense Smashing: 0 (Weighed: 0) Resistance Psionic: 0.045 (Weighed: 0.0225) Recovery: 0 (Weighed: 0) 
* Grant Invisibility (Slots: 6): Shield Wall Def/EndRdx, Shield Wall Def/Rchg, Shield Wall EndRdx/Rchg, Shield Wall Def/EndRdx/Rchg, Shield Wall Def, Shield Wall ResDam/Re TP || Set Bonuses: Defense Smashing: 0 (Weighed: 0) Resistance Psionic: 0.0375 (Weighed: 0.01875) Recovery: 0 (Weighed: 0) 
* Insulation Shield (Slots: 6): Gift of the Ancients Def/EndRdx, Gift of the Ancients Def/Rchg, Gift of the Ancients EndRdx/Rchg, Gift of the Ancients Def/EndRdx/Rchg, Gift of the Ancients Def, Gift of the Ancients Run+ || Set Bonuses: Defense Smashing: 0 (Weighed: 0) Resistance Psionic: 0.045 (Weighed: 0.0225) Recovery: 0.02 (Weighed: 0.005) 
* Invisibility (Slots: 2): Gift of the Ancients Def/EndRdx, Gift of the Ancients Def/Rchg || Set Bonuses: Defense Smashing: 0 (Weighed: 0) Resistance Psionic: 0 (Weighed: 0) Recovery: 0.02 (Weighed: 0.005) 
* Mass Hypnosis (Slots: 6): Fortunata Hypnosis Sleep, Fortunata Hypnosis Sleep/Rchg, Fortunata Hypnosis Acc/Sleep/Rchg, Fortunata Hypnosis Acc/Rchg, Fortunata Hypnosis Sleep/EndRdx, Fortunata Hypnosis Plct% || Set Bonuses: Defense Smashing: 0 (Weighed: 0) Resistance Psionic: 0.06 (Weighed: 0.03) Recovery: 0.04 (Weighed: 0.01) 
* Telekinesis (Slots: 1): EndRdx || Set Bonuses: Defense Smashing: 0 (Weighed: 0) Resistance Psionic: 0 (Weighed: 0) Recovery: 0 (Weighed: 0) 
* Dispersion Bubble (Slots: 2): DefBuff, DefBuff || Set Bonuses: Defense Smashing: 0 (Weighed: 0) Resistance Psionic: 0 (Weighed: 0) Recovery: 0 (Weighed: 0) 
* Total Domination (Slots: 1): Acc || Set Bonuses: Defense Smashing: 0 (Weighed: 0) Resistance Psionic: 0 (Weighed: 0) Recovery: 0 (Weighed: 0) 
* Terrify (Slots: 4): Positron's Blast Acc/Dmg, Positron's Blast Dmg/EndRdx, Javelin Volley Dam%, Javelin Volley Acc/Dmg || Set Bonuses: Defense Smashing: 0 (Weighed: 0) Resistance Psionic: 0 (Weighed: 0) Recovery: 0.045 (Weighed: 0.01125) 
* Boxing (Slots: 5): Superior Blistering Cold Acc/Dmg, Superior Blistering Cold Dmg/EndRdx, Superior Blistering Cold Acc/Dmg/EndRdx, Superior Blistering Cold Acc/Dmg/Rchg, Superior Blistering Cold Dmg/EndRdx/Acc/Rchg || Set Bonuses: Defense Smashing: 0.05 (Weighed: 0.05) Resistance Psionic: 0 (Weighed: 0) Recovery: 0.04 (Weighed: 0.01) 
* Tough (Slots: 6): Aegis ResDam/EndRdx, Aegis ResDam/Rchg, Aegis EndRdx/Rchg, Aegis ResDam/EndRdx/Rchg, Aegis ResDam, Aegis Psi/Status || Set Bonuses: Defense Smashing: 0 (Weighed: 0) Resistance Psionic: 0.045 (Weighed: 0.0225) Recovery: 0 (Weighed: 0) 
* Weave (Slots: 2): Kismet Def/EndRdx, Kismet Def/Rchg || Set Bonuses: Defense Smashing: 0 (Weighed: 0) Resistance Psionic: 0 (Weighed: 0) Recovery: 0.015 (Weighed: 0.00375) 
* Mass Confusion (Slots: 6): Malaise's Illusions Acc/Rchg, Malaise's Illusions EndRdx/Conf, Cacophany Acc/Rchg, Cacophany EndRdx/Conf, Befuddling Aura Acc/Rchg, Befuddling Aura EndRdx/Conf || Set Bonuses: Defense Smashing: 0 (Weighed: 0) Resistance Psionic: 0 (Weighed: 0) Recovery: 0.045 (Weighed: 0.01125) 
* Force Bubble (Slots: 1): RechRdx || Set Bonuses: Defense Smashing: 0 (Weighed: 0) Resistance Psionic: 0 (Weighed: 0) Recovery: 0 (Weighed: 0) 
* Repulsion Bomb (Slots: 2): Acc, Dmg || Set Bonuses: Defense Smashing: 0 (Weighed: 0) Resistance Psionic: 0 (Weighed: 0) Recovery: 0 (Weighed: 0) 
* Force Bolt (Slots: 3): Ruin Acc/Dmg, Ruin Dmg/EndRdx, Dmg || Set Bonuses: Defense Smashing: 0 (Weighed: 0) Resistance Psionic: 0.015 (Weighed: 0.0075) Recovery: 0 (Weighed: 0) 
* Repulsion Field (Slots: 1): RechRdx || Set Bonuses: Defense Smashing: 0 (Weighed: 0) Resistance Psionic: 0 (Weighed: 0) Recovery: 0 (Weighed: 0) 
* Detention Field (Slots: 6): Acc, EndRdx, EndRdx, EndRdx, RechRdx, RechRdx || Set Bonuses: Defense Smashing: 0 (Weighed: 0) Resistance Psionic: 0 (Weighed: 0) Recovery: 0 (Weighed: 0) 
Defense Smashing Total Bonus: 0.05 (Weighed: 0.05)
Resistance Psionic Total Bonus: 0.3375 (Weighed: 0.16875)
Recovery Total Bonus: 0.3849999 (Weighed: 0.09624998)
 

 

The proof of concept is now feature complete. The next step is implementing a minimal viable product (MVP). The MVP will have a user interface, code improvements, and additional features. It will also be downloadable so players can try it out.

 

Discussion of the MVP will be on a new thread.

 

Code:

 

DatabaseAPI.cs PowerEntry.cs clsToonX.cs

Edited by magicjtv
Added code.
Link to comment
Share on other sites

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...