Machine learning
MrStabby, you're most likely right, machine learning isn't my area of expertise either.
Most likely I'd be using the Python scipy.solver if I were to, as that would make life easier.
Although, from my party it is clear that a top priority is I should make a user interface and compile it as a .exe file for my Windows friends.
A possible direction
For now, the script works well at predicting the true difficulty of an encounter for a experienced party, which is what I need.*
The current encounter builder, page 56 of the Basic rules or somewhere in the DMG, is for newbies. That makes me think: I could recalculate the values on the table and of common monsters —it'd be a good use for the script, although I'd have to write a calculator in JavaScript, which is yucky.
*) It predicts who may win at a PvP battle, but my friends dispute the particulars of the results and come up with more reasons why there is a flaw.

Degrees of victory
Chronos, that is a good point. There is a Perfect win (9 hp loss), a normal win and a "near TPK" (one character drops). The near TPKs are arguably why a truly hard encounter is fun. Average number of turns is a nice metric too.