Orientation of one statistic
It is pretty simple. Firstly, a few assumptions:
You did not mention this, but it seems that you can only wear one type of armor for a particular slot. That is, you cannot wear two pairs of underpants or two shirts.
Presumably, the choice of one item of gear does not affect or does not conflict with others (except for the limitation of not having more than one piece of clothing in one slot). That is, if you wear pants, this in no way prevents you from wearing a shirt. But note, more subtly, that we assume that you are not getting any synergy from wearing two related items.
Suppose you want to configure the X statistics. Then the algorithm looks like this:
- Group all items by slot.
- In each group, sort the potential elements in this group by how much they increase X in descending order.
- Select the first item in each group and put it on.
- A set of selected items is an optimal load.
Evidence. The only way to get a higher criterion X is if there were an element A that provided more X than any other in its group. But we have already sorted all the elements in each group in descending order, so this A cannot be.
What happens if assumptions are violated?
If the assumption is incorrect, i.e. you can carry several elements in each slot, then instead of selecting the first element from each group, select the first Q elements from each group, where Q (s) is the number of elements that can go to s slots.
If assumption two is incorrect, that is, the elements influence each other - then we do not have enough information to solve the problem. We would need to know exactly how the elements can influence each other, or they are forced to try every possible combination of elements with brute force and see which ones have the best overall results.
Targeting Statistics N
If you want to set up multiple statistics right away, you need a way to say “how good” something is. This is called a fitness feature. You will need to decide how important statistics N are relative to each other. For example, you can decide that each +1 to perception costs 10 points, and each +1 to intelligence costs only 6 points. Now you have a way to appreciate the "kindness" of objects relative to each other.
Once you do this, instead of optimizing for X, you will instead optimize function F, the fitness function. This process will be the same as above for one statistic.
John feminella
source share