B Optimizing permutations of hero traits in a computer game

liquidFuzz
Messages
107
Reaction score
6
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:
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.
 
Insights auto threads is broken atm, so I'm manually creating these for new Insight articles. In Dirac’s Principles of Quantum Mechanics published in 1930 he introduced a “convenient notation” he referred to as a “delta function” which he treated as a continuum analog to the discrete Kronecker delta. The Kronecker delta is simply the indexed components of the identity operator in matrix algebra Source: https://www.physicsforums.com/insights/what-exactly-is-diracs-delta-function/ by...
Fermat's Last Theorem has long been one of the most famous mathematical problems, and is now one of the most famous theorems. It simply states that the equation $$ a^n+b^n=c^n $$ has no solutions with positive integers if ##n>2.## It was named after Pierre de Fermat (1607-1665). The problem itself stems from the book Arithmetica by Diophantus of Alexandria. It gained popularity because Fermat noted in his copy "Cubum autem in duos cubos, aut quadratoquadratum in duos quadratoquadratos, et...
I'm interested to know whether the equation $$1 = 2 - \frac{1}{2 - \frac{1}{2 - \cdots}}$$ is true or not. It can be shown easily that if the continued fraction converges, it cannot converge to anything else than 1. It seems that if the continued fraction converges, the convergence is very slow. The apparent slowness of the convergence makes it difficult to estimate the presence of true convergence numerically. At the moment I don't know whether this converges or not.

Similar threads

Back
Top