Ok, so the best example to characterize this is that of a role-playing game. In this game each character has a number of 'stats': strength, agility, armor factor, that sort of thing. These stats can be improved by qualities of items that you find in the game. For each stat there is a base value, which can be ignored for the purposes of this problem, and a maximum 'boost' value.
Each character has, say, twelve slots for items from helm to rings and weapons, etc. In the game there are thousands of items that can be put in these slots. The items that a given character can use is restricted by various factors and so the usable number is less than the total number. Each item has from 1 to 5 individual qualities that improve from 1 to 5 character stats. The total number of character 'stats' that can be affected by items, including base attributes, skills, bonuses, etc., is a couple of dozen.
Summary: thousands of potential items to fit in twelve slots in such a way as to maximize stat improvement across a couple of dozen stats.
I've just started thinking about this problem, and wanted to toss it out there for some ideas from you guys. It seems like a variation on the knapsack problem to me, and is likely NP-hard.
My thoughts are to begin by sorting the list of all items into bags containing items that will fit in each slot and can be used by a given character, and then start some sort of random shuffling process.
Each character has, say, twelve slots for items from helm to rings and weapons, etc. In the game there are thousands of items that can be put in these slots. The items that a given character can use is restricted by various factors and so the usable number is less than the total number. Each item has from 1 to 5 individual qualities that improve from 1 to 5 character stats. The total number of character 'stats' that can be affected by items, including base attributes, skills, bonuses, etc., is a couple of dozen.
Summary: thousands of potential items to fit in twelve slots in such a way as to maximize stat improvement across a couple of dozen stats.
I've just started thinking about this problem, and wanted to toss it out there for some ideas from you guys. It seems like a variation on the knapsack problem to me, and is likely NP-hard.
My thoughts are to begin by sorting the list of all items into bags containing items that will fit in each slot and can be used by a given character, and then start some sort of random shuffling process.