Optimizing permutations of hero traits in a computer game

  • #1
97
3
TL;DR Summary
Trying to optimize perk cards in a computer game
I have a game where heroes have a set of traits, or abilities. The level of the abilities are raised in two ways, by banner cards and/or by leveling the hero. The Banner cards and heroes don't match perfectly, rather a banner card can match 1 or 2 (sometimes 3) abilities of the heroes abilities. Being... me, i wrote some lines of code that iterated trough the possible permutations to find the optimal permutation in terms of maximizing the ability outcome for the heroes.

Now I wonder if there is a way of using optimization to solve similar problems.
The setup is as follows,
Hero 1 : A, D, F, R
Hero 2 : B,D,E,S
Hero 3 : A,E,R,T
Etc..

Banner Card 1 : A,B,C,D
Banner card 2 : A,F,R,E
etc...

Edit, I'm interested in optimization in terms of maximum number ability matching between heroes and banner cards.
 
Last edited:

Answers and Replies

  • #2
I think I still don't understand exactly what your optimization goal is, just to try to use as many cards as possible? Can you only level up each ability once or something?
 
  • #3
This sounds like an ##n-##dimensional discrete optimization problem. I'm sure there are algorithms for it once you set up your problem rigorously. I assume you have to find a closest lattice point to an edge of an irregular polyhedron. One possibility that comes to mind is to solve the corresponding continuous linear optimization problem and determine the nearest lattice point from the solution.
 

Suggested for: Optimizing permutations of hero traits in a computer game

Replies
3
Views
553
Replies
2
Views
686
Replies
5
Views
920
Replies
3
Views
558
Replies
2
Views
500
Replies
0
Views
507
Replies
2
Views
2K
Replies
2
Views
625
Replies
0
Views
995
Replies
195
Views
17K
Back
Top