Using Python3 To Estimate BIS Gear Sets For Ninja.

Eorzea Time
 
 
 
Langues: JP EN FR DE
users online
Forum » FFXI » Jobs » Ninja » Using Python3 to estimate BIS gear sets for Ninja.
Using Python3 to estimate BIS gear sets for Ninja.
First Page 2 3 4 5 6 7 8 9
Offline
Posts: 313
By Izanami 2021-07-19 18:31:31
Link | Citer | R
 
Node 456
[+]
 Asura.Arico
Offline
Serveur: Asura
Game: FFXI
user: Tename
Posts: 535
By Asura.Arico 2021-07-19 19:02:10
Link | Citer | R
 
This is so cool! Great job. This has been on my growing list of things to do.

Question -- I'm surprised Nagi didn't score higher on the hybrid/magical WS. From my parses it beats Heishi by a decent margin. Did you include the fact that Mythic AM3 procs on hybrid WS count as additional magical hits? Or was Heishi just better in the long run?
[+]
Offline
Posts: 14751
By Pantafernando 2021-07-19 19:21:04
Link | Citer | R
 
Everyone using python nowaday.

Good thing im a forever bandwagoner
[+]
 Asura.Arico
Offline
Serveur: Asura
Game: FFXI
user: Tename
Posts: 535
By Asura.Arico 2021-07-19 20:06:23
Link | Citer | R
 
Pantafernando said: »
Everyone using python nowaday.

Good thing im a forever bandwagoner

Matlab?
 Quetzalcoatl.Trulusia
Offline
Serveur: Quetzalcoatl
Game: FFXI
user: Trulusia
Posts: 1132
By Quetzalcoatl.Trulusia 2021-07-19 20:30:11
Link | Citer | R
 
Asura.Arico said: »
Pantafernando said: »
Everyone using python nowaday.

Good thing im a forever bandwagoner

Matlab?

Why would you insult that man like that?
[+]
Offline
Posts: 313
By Izanami 2021-07-19 20:59:17
Link | Citer | R
 
Asura.Arico said: »
This is so cool! Great job. This has been on my growing list of things to do.

Question -- I'm surprised Nagi didn't score higher on the hybrid/magical WS. From my parses it beats Heishi by a decent margin. Did you not include the fact that Mythic AM3 procs on hybrid WS count as additional magical hits?

Thanks for the comment.

For Hybrids: I'm calculating all physical hits, including multi-attack hits, before calculating the magical portion. So the magical portion does indirectly benefit from the Mythic AM3, but only because the magical portion is based on the physical portion. The magical portion is calculated using the physical portion's total damage, the FTP listed on BG-wiki plus any Fotia gear, and any magical stats such as Magic Damage and Magic Attack. I'm not applying the magical portion multiple times for multi-attack procs. I'm treating the magical portion as a single instance of bonus damage to an otherwise purely physical weapon skill.

Assuming the method above for calculating Hybrid damage is correct, then I think in these cases it comes down to TP Bonus being such a powerful stat for "damage varies with TP" weapon skills. The TP Bonus +500 and higher base damage provided by Heishi result in a larger average damage compared to the Mythic AM3 on Nagi.

If we compare the benefit of TP Bonus+500 vs the benefit of Mythic AM3 for the specific case of using the WS at 1150 TP for the set shown above with standard buffs (BRD+COR):
[+]
 Asura.Arico
Offline
Serveur: Asura
Game: FFXI
user: Tename
Posts: 535
By Asura.Arico 2021-07-19 22:51:13
Link | Citer | R
 
Great post. It's been a while since I've read anything discussing this, but I thought the working theory was that multi hit(or maybe just AM3?) applied additional magical hits, which was the only way to explain the damage spikes that were way higher than their theoretical maximum.
 Ramuh.Austar
Offline
Serveur: Ramuh
Game: FFXI
user: Austar
Posts: 10481
By Ramuh.Austar 2021-07-19 23:45:08
Link | Citer | R
 
Izanami said: »
It should be noted that these sets are based on 50,000 single weapon skill simulations. Stats such as Skillchain Bonus (see Nyame) have no effect as a result until I finish the code to be a proper DPS simulator with auto-attacks, TP rounds, auto-WS, and SCs. Swapping some pieces listed in these sets with Nyame will lower weapon skill damage, but the skillchain bonus stat will likely result in larger overall damage.
I already have this done for most jobs (also in Python3) if you want to work on something together. I just don't run every single piece likes you since you get into billions of combinations with only a few pieces per slot.
[+]
Offline
Posts: 313
By Izanami 2021-07-20 12:56:18
Link | Citer | R
 
Asura.Arico said: »
[Great post. It's been a while since I've read anything discussing this, but I thought the working theory was that multi hit(or maybe just AM3?) applied additional magical hits, which was the only way to explain the damage spikes that were way higher than their theoretical maximum.

Assuming no contribution from physical damage, the magical portion of hybrid weapon skills uses the player's "Magic Damage" stat as a base. This means that even if you do 0 physical damage, you can still potentially hit some amount of magical damage assuming the enemy isn't also immune to magical damage. Luckily, the Lode Golem enemy in Ro'Maeve is immune to physical damage, allowing us to only test the magical portion of hybrid weapon skills. If mythic AM3 directly affects this magical portion in any way, then we should clearly see its effect after only a handful of weapon skills.

To keep the math simple, I took off my subjob and swapped into Store TP gear without any multi-attack. With mythic AM3 being my only source of multi-attack, the test is against the published rates of: OA3=20%, OA2=32%, and 48% without any AM3 proc. Since I don't have a 2nd character to give myself Tactician's Roll, I only performed 12 Blade: Chi with AM3 up. This is super low number statistics, but shouldn't matter much given that the OA3 and OA2 rates on mythic AM3 are 20% and 40%, respectively. Such large probabilities should frequently show up, even in low number statistics.

Out of 12 Blade: Chi, I observed damage=[249, 249, 274, 249, 249, 249, 249, 249, 274, 249, 249, 249], which is consistent with zero mythic AM3 procs on the magical portion of Blade: Chi. Coincidentally, I tested this on Earthsday just before the maintenance last night, so I received two day-procs for +10% (+25) damage.

Assuming a Binomial distribution, the chance of seeing exactly zero AM3 procs in 12 trials is 0.015%. This simple test suggests that mythic AM3 does not directly affect the magical portion of hybrid weapon skills.

If you have a COR mule for Tactician's Roll, I recommend you try this as well, but with N=50~100 instead of N=12.



Ramuh.Austar said: »
I already have this done for most jobs (also in Python3) if you want to work on something together. I just don't run every single piece likes you since you get into billions of combinations with only a few pieces per slot.[/spoiler]

In my case, I'm only checking one slot at a time, which is only 102 total pieces to check per iteration. This method is usually fine, but it will fail to find a set that requires two or more pieces together if they don't perform well individually. A way around this is to calculate the average damage of all combinations of all equipment being tested. However, with the gear that I'm using for physical weapon skills, there are 49.3 billion different combinations. I think even in the best-case scenario with CUDA-based GPU multiprocessing (that I have no real experience with), it would take about 3 hours to check all 49.3 billion sets per weapon skill, based on cProfile function timing measurements. I think it might be a good way to learn some GPU programming with Python3, but it's not worth the computation time to find out that the absolute best set is only 3% better than the sets I've already found with my flawed method.

Working together on a proper DPS simulator would be pretty fun since you already finished one for most jobs and mine is almost finished. I could probably learn something about Python3 or FFXI from the collaboration. I'll be too busy for at least the next week with classes/work so I can't work on it for a while, though.
 Asura.Arico
Offline
Serveur: Asura
Game: FFXI
user: Tename
Posts: 535
By Asura.Arico 2021-07-20 12:58:57
Link | Citer | R
 
Izanami said: »
Assuming a Binomial distribution, the chance of seeing exactly zero AM3 procs in 12 trials is 0.015%. This simple test suggests that mythic AM3 does not directly affect the magical portion of hybrid weapon skills.


Interesting. I guess this probably also means Doji is better than Koga for Jinpu.
Offline
Posts: 9079
By SimonSes 2021-07-20 15:16:49
Link | Citer | R
 
Izanami said: »
This method is usually fine, but it will fail to find a set that requires two or more pieces together if they don't perform well individually.

I think it might actually fail a lot if stuff like WSD or PDL is involved. Diminishing returns on those will change things a lot, if you compare each piece with no diminishing returns at all, then it wont be accurate.
[+]
 Ramuh.Austar
Offline
Serveur: Ramuh
Game: FFXI
user: Austar
Posts: 10481
By Ramuh.Austar 2021-07-20 15:36:11
Link | Citer | R
 
Izanami said: »
However, with the gear that I'm using for physical weapon skills, there are 49.3 billion different combinations. I think even in the best-case scenario with CUDA-based GPU multiprocessing (that I have no real experience with), it would take about 3 hours to check all 49.3 billion sets per weapon skill, based on cProfile function timing measurements. I think it might be a good way to learn some GPU programming with Python3, but it's not worth the computation time to find out that the absolute best set is only 3% better than the sets I've already found with my flawed method.
It won't be very feasible when you start adding in multiple sets. Add in factors like JA abilities that don't last forever but fights length is greater than the duration like MNK having Impetus and Footwork changes, or DRK with Last Resort changes. Add in even more WS sets if doing separate WS for skillchains or running two DD simultaneously to compare how they can do either individually or doing 2-4 step skillchains, you start getting into unreasonable numbers which is why I just do manual gear selections.
[+]
Offline
Posts: 223
By joemamma 2021-07-20 15:45:16
Link | Citer | R
 
Well according to my spreadsheet you are wrong.
 Shiva.Thorny
Offline
Serveur: Shiva
Game: FFXI
user: Rairin
Posts: 2852
By Shiva.Thorny 2021-07-20 15:57:52
Link | Citer | R
 
Asura.Arico said: »
I thought the working theory was that multi hit(or maybe just AM3?) applied additional magical hits, which was the only way to explain the damage spikes that were way higher than their theoretical maximum

If(and I'm not substantiating this, only going off what you said) damage spikes higher than theoretical maximum occur, it's possible that AM3 is treated differently than a typical multi-attack on the server side and all the hits are being combined when determining the magic damage hit. This would both result in no effect on lode golems(as magic hit is based on physical hit, and physical hit is 0, higher physical hit doesn't matter) and allow for spikes to occur.
Offline
Posts: 9079
By SimonSes 2021-07-20 17:12:20
Link | Citer | R
 
Shiva.Thorny said: »
Asura.Arico said: »
I thought the working theory was that multi hit(or maybe just AM3?) applied additional magical hits, which was the only way to explain the damage spikes that were way higher than their theoretical maximum

If(and I'm not substantiating this, only going off what you said) damage spikes higher than theoretical maximum occur, it's possible that AM3 is treated differently than a typical multi-attack on the server side and all the hits are being combined when determining the magic damage hit. This would both result in no effect on lode golems(as magic hit is based on physical hit, and physical hit is 0, higher physical hit doesn't matter) and allow for spikes to occur.

Im not saying Arico is lying, but I would need to see proofs of those "impossible" to occur damage spikes first, because with how hybrid works and how they respond to something like 2x TA proc, max damage potential will often be at 60-70k+ and many times you will faster reach 99k damage cap than theoretical cap on hybrids WS damage.
 Asura.Arico
Offline
Serveur: Asura
Game: FFXI
user: Tename
Posts: 535
By Asura.Arico 2021-07-20 18:10:11
Link | Citer | R
 
I'm purely basing it on a previous discussion on these boards from like 2017. I'll look for them. Pretty sure snaps was heavily involved. I'll look through his posts.


SimonSes said: »
Im not saying Arico is lying, but I would need to see proofs of those "impossible" to occur damage spikes first, because with how hybrid works and how they respond to something like 2x TA proc, max damage potential will often be at 60-70k+ and many times you will faster reach 99k damage cap than theoretical cap on hybrids WS damage.

What do you mean by that?
Offline
Posts: 313
By Izanami 2021-07-20 21:23:45
Link | Citer | R
 
SimonSes said: »
Izanami said: »
This method is usually fine, but it will fail to find a set that requires two or more pieces together if they don't perform well individually.

I think it might actually fail a lot if stuff like WSD or PDL is involved. Diminishing returns on those will change things a lot, if you compare each piece with no diminishing returns at all, then it wont be accurate.

I don't think I understand what you're getting at. Diminishing returns can not be a reason that the code finds the wrong piece of gear (or fails to find the correct piece of gear).

The only situation that the code does not handle properly will have the following logic:
  • Swapping to piece A is a downgrade

  • Swapping to piece B is a downgrade

  • Simultaneously swapping to pieces A and B is an upgrade of more than 0.5%


All other situations involve piece A and/or piece B being an upgrade, which the code handles properly.

These edge-case only come up with set bonuses, which provide extra stats for having more pieces equipped. Even in those cases, the extra stats gained are generally too weak to make up for the loss of damage for using a better piece. I should mention here that the code does handle set bonuses properly, but it doesn't go out of its way to build a set just for the bonuses.

The method I'm using has no trouble handling diminishing returns as long as it runs more than one iteration (checks every slot more than once). I run up to 20 iterations to deal with this, but the code has always converged within 3~5 iterations.
 Asura.Arico
Offline
Serveur: Asura
Game: FFXI
user: Tename
Posts: 535
By Asura.Arico 2021-07-20 21:38:50
Link | Citer | R
 
Izanami said: »
Swapping to piece A is a downgrade

Swapping to piece B is a downgrade

Simultaneously swapping to pieces A and B is an upgrade of more than 0.5%

Isn’t this a lot of situations?


The conventional wisdom I’ve always been told is you want a semi-even spread, because as you get more base stat WSD or MA become valuable etc and vice versa.
Offline
Posts: 313
By Izanami 2021-07-20 21:56:55
Link | Citer | R
 
Asura.Arico said: »
Izanami said: »
Swapping to piece A is a downgrade

Swapping to piece B is a downgrade

Simultaneously swapping to pieces A and B is an upgrade of more than 0.5%

Isn’t this a lot of situations?

It actually might occur more often than I gave it credit for in my last post. When I wrote the code I just intuitively assumed it could happen often.

I may have been overthinking things when I wrote that last post claiming that this situation only happens with set bonuses. I couldn't think of a single concrete example where swapping two pieces together is an upgrade, but swapping either one alone is a downgrade. The code properly handles one of them being an upgrade by itself leading into both together being a larger upgrade even if the other was a downgrade, but it can't handle two "bad" pieces being better than two other "good" pieces without extra stats from a set bonus.

If you can think of an example where this is the case then please send me the gear set and buffs used so I can confirm it in the spreadsheet. It's bugging me that I think I should be able to find such a situation, but I can't. It's the same feeling as having a song stuck in my head but I can't remember all the lyrics or the title.
 Ramuh.Austar
Offline
Serveur: Ramuh
Game: FFXI
user: Austar
Posts: 10481
By Ramuh.Austar 2021-07-21 00:53:34
Link | Citer | R
 
First thing that comes to mind that way would be if piece A is more damage but gives a lower result due to something such as accuracy. Piece B would just be lower damage, but has more accuracy, so if wearing both you would cap accuracy and still have more damage.
[+]
 Phoenix.Capuchin
Offline
Serveur: Phoenix
Game: FFXI
user: Anza
Posts: 3628
By Phoenix.Capuchin 2021-07-21 01:48:31
Link | Citer | R
 
Izanami said: »
I'm still convinced the developers accidentally swapped the modifiers for Jishnu's Radiance (80% DEX) and Blade: Hi (80% AGI) and refuse to admit it.

Heh, you and me both. That's really the only reasonable explanation!

Makes me think of the other one that drives me crazy knowing it just MUST be backwards - the Alexander and Odin battlefield songs. The name "Ragnarok" (the Alexander fight music) is obviously consistent with the Norse mythology themes of Odin and Einherjar; "Iron Colossus" (the Odin music) is a perfect description of Alexander, which is... an iron colossus? I am astounded that people have argued with me over that seemingly obvious mistake. I'll die on those two FFXI conspiracy theory hills.

But back on topic, really cool project - thanks for sharing!
[+]
 Asura.Nilats
Offline
Serveur: Asura
Game: FFXI
user: Kaisr
Posts: 23
By Asura.Nilats 2021-07-21 22:03:32
Link | Citer | R
 
Big python/automation fan love to see it applied to FFXI kudos to you. Are you planning on releasing your code?
Offline
Posts: 313
By Izanami 2021-07-23 16:35:59
Link | Citer | R
 
Ramuh.Austar said: »
First thing that comes to mind that way would be if piece A is more damage but gives a lower result due to something such as accuracy. Piece B would just be lower damage, but has more accuracy, so if wearing both you would cap accuracy and still have more damage.

This makes sense, thanks. The code is simulating against Apex Toads which have fairly low accuracy requirements so it's no surprise that I don't run into this issue without Hitaki equipped. Simulating against Lv137-139 Apex Bats instead may cause this issue to come up more frequently without the proper buffs. Although, a real situation wouldn't be micromanaging gear accuracy to such a degree when you could just swap a Minuet for a Madrigal anyway.

Asura.Nilats said: »
Big python/automation fan love to see it applied to FFXI kudos to you. Are you planning on releasing your code?

I'll likely upload the entire code to Github sometime later after I've made some updates to speed it up and make it user friendly. I've been incredibly busy with deadlines to meet recently and will remain busy for a while, so I'm not sure when I'll get around to this. Only one of the files needs changed to see significant performance improvements, though. I may upload the others pretty soon.
[+]
 Asura.Saevel
Offline
Serveur: Asura
Game: FFXI
Posts: 9933
By Asura.Saevel 2021-07-23 16:58:26
Link | Citer | R
 
Now they need to write a playbook that automatically deploys the code, analysis your gearswap and starts to update it optimize it accordingly.
[+]
Offline
Posts: 9079
By SimonSes 2021-07-23 17:03:23
Link | Citer | R
 
Asura.Saevel said: »
Now they need to write a playbook that automatically deploys the code, analysis your gearswap and starts to update it optimize it accordingly.

It would also need to check available gear first :)
 Bahamut.Wizardstick
Offline
Serveur: Bahamut
Game: FFXI
user: Sieve
Posts: 21
By Bahamut.Wizardstick 2021-07-23 20:18:20
Link | Citer | R
 
I'm sure this is good info but the title of this post reminds me of that funny skit from CSI.

Especially because the post doesn't even talk about your python code.

https://www.youtube.com/watch?v=hkDD03yeLnU
necroskull Necro Bump Detected! [31 days between previous and next post]
Offline
Posts: 313
By Izanami 2021-08-23 13:46:01
Link | Citer | R
 
Thanks for waiting patiently. I've been incredibly busy since making the original post. Among other things, I've recently graduated, moved to a new apartment 400 miles away, and started a new job.

I've managed to make the changes that I felt were necessary before the code was worth publishing. They were incredibly easy changes to make, but I just didn't have the time and motivation to sit down and finalize them until yesterday. I don't plan on making large changes to the code anytime soon, but it's worth at least posting what I have so that those who requested the code can view it.

I'm not very familiar with GitHub, but I've put the code on my newly-created GitHub page (https://github.com/IzaKastra/wsdist). The format of the code is pretty embarrassing, but I definitely do not want to spend time reformatting everything in the near future.

The basic process to run the code is:
  • Check the gear.py file for equipment you want to test in each slot.

  • Modify the init.py file to choose the weapon skill, TP range, buffs, etc to be used.

  • Run the wsdist.py file to find the best sets.



List of changes since I made the original post:

The code makes use of the following Python libraries:

Again, this was originally just small project to learn more Python3 and about the FFXI damage formulae. If you're proficient in Python3 and notice some bad habits or significant inefficiencies in my code, please let me know so that I can learn a bit more by fixing them.

Feel free to comment here, message me on ffxiah, or /tell me in game if you have any questions, comments, or suggestions, or if you find any typos or errors in my methods.

Bonus Ninja sets!
[+]
 Asura.Bippin
Offline
Serveur: Asura
Game: FFXI
user: Gunit
Posts: 1090
By Asura.Bippin 2021-08-23 13:51:17
Link | Citer | R
 
Ammo for Kasha is wrong FYI
Offline
Posts: 313
By Izanami 2021-08-23 14:24:38
Link | Citer | R
 
Asura.Bippin said: »
Ammo for Kasha is wrong FYI

Thanks for the note. I forgot that gear set comments don't appear when using [itemset] formatting.

I've added a comment stating that Ghastly Tathlum is a stand-in for Crepsecular Pebble since FFXIAH has not yet added the Shinryu gear to their gear sets and since they share the same item icon.

It should also be noted that Alber Strap won by default because I didn't check other grips. Not that I expect people to actually try Tachi: Kasha on NIN.
[+]
 Asura.Aeonova
Offline
Serveur: Asura
Game: FFXI
user: aeonova
Posts: 3113
By Asura.Aeonova 2021-08-23 15:06:25
Link | Citer | R
 
Remember the early days in the d00ns, island, and jungle while playing the game and weapon-skilling in the same gear you would TP in?

A simpler time.
[+]
First Page 2 3 4 5 6 7 8 9