When I normally have a math type question I post them in this forum so this may sound misplaced, but give it a shot. I am playing a video game where there are different soldiers that have different attacks / heath / etc. My army can only be so big maxed at a number X. Each soldier takes up a different amount of that army, Y. How do I figure out what the proper mix of soldiers is to maximize my attack and health without just randomly trying different configurations?