Jump to content

magicjtv

Members
  • Posts

    200
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by magicjtv

  1. 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. 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
  2. Status update. There was a bug in the multi-optimize code that took a while for me to track down. It's fixed now and I'm doing more testing on that feature.
  3. 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.
  4. 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.
  5. 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.
  6. 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: 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. Make a random change to a power, multiplying the result by the weight assigned to that item (Mutation function). Repeat step 2 for each item in the goals list. Select the item from steps 2 and 3 that produced the highest change. If the change is closer to the goal than the original, keep the change, otherwise revert to the original (Fitness function). Repeat steps 2-5 ten times for the power. Do steps 2-6 for every power. 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
  7. Status update. Added the ability to convert AIToon to/from clsToonX (Mid's internal representation of a toon) Added the ability to save an AIToon to disk. A sample file is attached below. Code DatabaseAPI.cs PowerEntry.cs clsToonX.cs TEST.mxd
  8. I did a little bit of testing for metrics. Here's the results. The first chart shows the amount of time in seconds it takes to run 50, 100, 150, 250, 500, 1000, and 2000 generations of the AI. A Generation is when the AI cycles over the entire build. The runs were all done at 10 iterations. The second chart shows the bonus values produced at 50, 100, 150, 250, 500, 1000, and 2000 generations of the AI. The third chart shows the amount of time in seconds it takes to run 10, 25, 50, 100, 250, 500, and 1000 iterations of the AI. An iteration is when the AI cycles over a single power. These runs were all done at 100 generations. The fourth chart shows the bonus values produced at 10, 25, 50, 100, 250, 500, and 1000 iterations of the AI. NOTE: Each column on the chart is an independent run from every other column. That's why it's possible for runs with more generations/iterations to have smaller numbers than runs with less generations/iterations. During a single run, the bonuses can only stay the same or go up from one generation/iteration to the next. They can never go down. Time in seconds it takes to run 50, 100, 150, 250, 500, 1000, and 2000 generations of the AI. Bonus values produced at 50, 100, 150, 250, 500, 1000, and 2000 generations of the AI Time in seconds it takes to run 10, 25, 50, 100, 250, 500, and 1000 iterations of the AI Bonus values produced at 10, 25, 50, 100, 250, 500, and 1000 iterations of the AI
  9. Status update. Rearrange slots AI added. A few utility functions and more testing added. Number of generations increased from 100 to 150, in attempt to balance finding the optimal solution and execution speed. Samples. Compare to my previous status update to see the effects of the new AI. Starting build Optimized for smashing defense. Total Defense Smashing Set Bonuses: 0.16563 Optimized for psionic defense. Total Defense Psionic Set Bonuses: 0.1625 Optimized for all defense. Total Defense All Set Bonuses: 1.59067 Optimized for recovery with PvP. Total Recovery Set Bonuses: 0.805 Optimized for recovery without PvP. Total Recovery Set Bonuses: 0.85 Notice that although the recovery with PvP bonuses is higher than the same bonus from the previous status update, it is not higher than the recover without PvP bonuses in this status update. This is because evolutionary programs are not guaranteed to find the best result, only a good result. Running the same evolution again can produces a different result, as can tweaking the number of generations. Code DatabaseAPI.cs PowerEntry.cs
  10. Status update. The Highest Set AI has been improved to use the least number of enhancements needed to get the desired bonus, rather than always filling up all available slots. The ability to include/exclude PvP bonuses has been added. Frankenslot AI has been added. Huge execution speed increase. Samples Starting build Optimized for Smashing Defense. Total Defense Smashing Set Bonuses: 0.05 Optimized fr Psionic Defense. Total Defense Psionic Set Bonuses: 0.125 Optimized for All Defense. Total Defense All Set Bonuses: 1.14377 Optimized for Recovery with PvP. Total Recovery Set Bonuses: 0.69 Optimized for Recovery without PvP. Total Recovery Set Bonuses: 0.565 Code DatabaseAPI.cs PowerEntry.cs
  11. Oh, comments are very much welcome. I want the final product to be useful to all players, not just me, so feedback and suggestions will be a big help. General Map Of Where We're Going So the Proof of Concept I'm working on now will have most, but not all, of the key features by the time it's done. The most important feature that will be missing is a user interface. The final Proof of Concept code won't be usable by anyone but programmers with access to the code, and even for them it would be tedious to use. This will be followed up with an MVP (Minimal Viable Product) where I'll fork the Mids code base and add a user interface to both the AI and the set bonus spreadsheet I posted earlier. Once people have had a chance to play with this, we'll decide where we want to go next. Features That Will Be Added To The Proof Of Concept Frankenslot AI Rearrange slots AI Include relevant power effects, not just set bonuses, in the totals. For example, a shield with smashing defense should have its values included in the total smashing defense for the build. Optimize for multiple values simultaneously (Example: Smashing Defense and Recovery) Features That Will Not Be Added To The Proof Of Concept Support for unique enhancement bonuses, like Steadfast Protection +3 defense. This will be added in the MVP. Rearrange powers. I'm not even sure this will be added to the MVP. I like the idea, but it sounds like a lot of work, so I'd rather get the other things I've listed done first. Edit: To actually answer your question, 🙃, the Proof of Concept and MVP will 2. Rearrange already placed slots and IO sets in a build in order to match desired parameters for bonuses..
  12. My bad, I forgot to add the totals. I've updated the print function to print the totals for each power as well as the grand total, so I can't forget again. The grand total was 1.14377. The way it works is it adds up each relevant bonus effect of a power . So for example, Superior Winter's Bite has bonuses at 5 slots of 5% Defense Energy/Negative and 2.5% Defense Ranged, so a power with five slots of Superior Winter's bite counts as a 12.5% bonus (5% Energy + 5% Negative + 2.5% Ranged). I don't yet have the code to sum up the build beyond set bonuses, but that will be added Soon(TM).
  13. Fixed a bug in my rule of five check that was causing some powers to get more than five copies of a set and was causing some powers to get no sets at all. This only occurred when trying to optimize for all defense or all resistance. When asked to optimize the build for total defense, the AI now produces this: DatabaseAPI.cs PowerEntry.cs
  14. Status update. The new code is now over 2000 lines. The vast majority of this is testing code. Code for sorting, comparing, and cloning various things has been added. The first part of the AI is complete. It is a simple mutation that just puts the best available set into all the slots of a power. Additional mutation algorithms will soon be added. Support for unique enhancement bonuses, like Steadfast Protection +3 defense is not included. That feature won't ever be in the proof of concept, but will be added to later versions. If you're interested in seeing what the AI is producing, here's the build it uses in its tests: When asked to optimize the build for smashing defense, the AI produces this (Toon Smashing Defense Totals: Before: 0 After: 0.05): When asked to optimize the build for psionic defense, the AI produces this (Toon Psionic Defense Totals: Before: 0 After: 0.125) When asked to optimize the build for total defense, the AI produces this (Toon Defense Totals: Before: 0 After: 1.14377) Code files, for those interested... DatabaseAPI.cs PowerEntry.cs Edit: I just noticed the AI is ignoring rule of 5. I'll fix this before the next status update.
  15. Somewhere other than zippy share. That site looks like it's infested with malware.
  16. The code done so far is loosely based on Robotics, with the functions that detect powers, enhancements, and bonuses playing the role of sensors and the functions that change these values acting as manipulators. The actual brain that controls these sensors and manipulators will be built using evolutionary programming. It will do the following: Start with a given build and a goal on what we want to improve. Make a random change to a power (Mutation function). If the change is closer to the goal than the original, keep the change, otherwise revert to the original (Fitness function). Repeat steps 2 and 3 ten times for the power. Do steps 2-4 for every power. Do steps 2-5 one hundred times. (100 generations).
  17. Status update. The new code is now over 1000 lines. The vast majority of this is testing code. If you want to understand how the new features work, the testing code is the place to go. Testing functions all start with the word "Test". We can now create a build complete with powersets, powers, and slots, that is independent of the build you see in the UI. This will be used by the AI. Slots can be added or removed to/from the AI build. Enhancements can be changed in the AI build. Enhancement bonuses can be summed for each power in the AI build. The changes are contained in two files, which I'm attaching here for those who want to see the code. DatabaseAPI.cs PowerEntry.cs
  18. 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. enhancement-set-bonus.csv
  19. Thanks Bopper. I've reached the stage where I have to learn about others parts of Mids internals, but I'll get some new code up as soon as I can.
  20. With these capabilities complete, we're now ready to begin adding some actual AI.
  21. The code has been updated with the following features: Different numbers of slots are supported, whereas the previous code assumed everything was 6-slotted. Ability to determine which set in a group of sets has the highest bonus values. Fixed a bug in the retrieval of bonus powers. When called against the Single Shot power for Crabs, it produces the following results: For Any Defense Bonuses Defense (6 slots) Maelstrom's Fury Ruin Thunderstrike Devastation Exploited Vulnerability Achilles' Heel Undermined Defenses Apocalypse Shield Breaker Overwhelming Force Spider's Bite Superior Spider's Bite Winter's Bite Superior Winter's Bite Psionic Defense (6 slots) Devastation Apocalypse EnduranceDiscount (6 slots) <None> Defense (5 slots) Maelstrom's Fury Ruin Thunderstrike Exploited Vulnerability Achilles' Heel Shield Breaker Overwhelming Force Spider's Bite Superior Spider's Bite Winter's Bite Superior Winter's Bite Defense (4 slots) Maelstrom's Fury Thunderstrike Exploited Vulnerability Achilles' Heel Shield Breaker Spider's Bite Superior Spider's Bite Defense (3 slots) Maelstrom's Fury Thunderstrike Exploited Vulnerability Achilles' Heel Defense (2 slots) <None> For Highest Defense Bonuses Highest Defense (6 slots) Superior Winter's Bite 0.25 Highest Defense (5 slots) Superior Winter's Bite 0.125 Highest Defense (4 slots) Superior Spider's Bite 0.1 Highest Defense (3 slots) Thunderstrike 0.0625 Highest Defense (2 slots) <None> Highest Psionic Defense Apocalypse As before, there were no code changes required, only additions. All the code additions were in the DatabaseAPI.cs file. The additions are provided below. Just append the code to the DatabaseAPI class.
  22. The code to determine what sets have the desired bonuses in now in place and tested. When called against the Single Shot power for Crabs, it produces the following results For Any Defense Bonuses Maelstrom's Fury Ruin Thunderstrike Devastation Exploited Vulnerability Achilles' Heel Undermined Defenses Apocalypse Shield Breaker Gladiator's Javelin Overwhelming Force Spider's Bite Superior Spider's Bite Winter's Bite Superior Winter's Bite For Psionic Defense Bonuses Devastation Apocalypse For Endurance Discount <None> There were no code changes required, only additions. All the code additions were in the DatabaseAPI.cs file. The additions are provided below. Just append the code to the DatabaseAPI class.
  23. The first step to enabling AI to maximize set bonuses is determining what sets provide the desired bonus. I've gone through the Mids code and I believe the following outline describes how this would be done. How the information is stored in Mids * There's an enhancement enum called eType. It's in Enums.cs. Enhancements that are part of a set have a type of SetO. * Power.Effects contains the effects for powers. * For defense and resistance check Power.Effects.DamageType, Power.Effects.EffectType, and Power.Effects.Scale. * EffectTypes are defined in the eEffectType enum in Enums.cs. * DamageTypes are defined in the eDamage enum in Enum.cs. * Enhancements are stored in the database at DatabaseAPI.Database.Enhancements * Enhancemnet Bonuses are stored in the database at Database.EnhancementSets.Bonus. This is an array of indexes into the powers array. E.g. 7769 * Valid enhancements for a power are obtained using GetValidEnhancements in Powers.cs * An Enhancement knows what set it is a member of using the UIDSet member. This is set to an empty string for enhancements not part of a set. To get all the sets for a power that have a specified bonus type you would: 1) Get all valid enhancements for the power. (GetValidEnhancements(Enums.eType.SetO) in Powers.cs) 2) Discard enhancement sets that do not have the desired bonus. (Look up all bonuses in bonus array, index into powers)
  24. I've decided to add some AI to Mids to help players optimize their IO slotting. The AI will allow you to maximize various set bonuses, such as defense or resistance. This thread is to discuss the first step in implementing the AI: developing a proof of concept. Fair warning, it will be mostly technical mumbo jumbo on the internals of Mids. For those familiar with the internals of Mids, it will be a chance to provide feedback on my understanding of the code. For those not familiar with the internals of Mids, it will be a chance to get an idea for what the capabilities of the AI will be.
×
×
  • Create New...