Dark-Souls-PvP-AI icon indicating copy to clipboard operation
Dark-Souls-PvP-AI copied to clipboard

Retrain AIs

Open metal-crow opened this issue 4 years ago • 0 comments

pretty much anytime king is attacking, it's basing that decision on the AI (a neural network) i trained. The code at MindRoutines.C:132 is coded to make king very defensive. It won't attack automatically unless it can be sure there will be no retaliation (the enemy subanimation is between a range, which EXCLUDES the idle stance). It specifically excludes the idle stance because otherwise king would just trade all the time, and would lose when players figured that out. So i have the decision to attack if the opponent is in the idle stance SOLELY up to the AI. That's at MindRoutines.C:136, which allows king to attack during an enemy idle if the ai output is >0.5 (the network says yes basically). Now, it's important to note i trained this network pretty badly. I had basically no idea what i was doing at the time, in hindsight it really shouldn't have worked. One of the things the AI takes in to determine if it should attack is the poise damage of the player's weapon (Mindroutines.c:100). And since i trained it only on katanas when it gets poise damage for a non-katana weapon it has no idea what to do and throws up it's hands and doesn't attack. SO: to fix this, the correct way is retrain the AI on a bunch of different weapons, which is a lot of work and needs code to make it happen automatically.

Also the backstabbing AI is being a bit too aggressive

metal-crow avatar Aug 27 '19 04:08 metal-crow