B Optimizing permutations of hero traits in a computer game

Click For Summary
The discussion focuses on optimizing the matching of hero traits with banner cards in a computer game to maximize ability outcomes. The user has developed code to iterate through permutations of traits and is exploring further optimization techniques. The optimization goal is to maximize the number of ability matches between heroes and banner cards, raising questions about the constraints of leveling abilities. It is suggested that this problem resembles an n-dimensional discrete optimization challenge, with potential solutions involving continuous linear optimization methods. The conversation emphasizes the need for a rigorous setup to apply appropriate algorithms effectively.
liquidFuzz
Messages
107
Reaction score
6
TL;DR
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:
Mathematics news on Phys.org
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?
 
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.
 
Thread 'Erroneously  finding discrepancy in transpose rule'
Obviously, there is something elementary I am missing here. To form the transpose of a matrix, one exchanges rows and columns, so the transpose of a scalar, considered as (or isomorphic to) a one-entry matrix, should stay the same, including if the scalar is a complex number. On the other hand, in the isomorphism between the complex plane and the real plane, a complex number a+bi corresponds to a matrix in the real plane; taking the transpose we get which then corresponds to a-bi...

Similar threads

Replies
9
Views
5K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
4
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
Replies
4
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K