|
Hi, I have a problem for you maths gurus which I hope you can solve for me and also take pleasure in solving yourselves.
Any positive contribution is greatly appreciated. If all of this is disgustingly simple to you, please humour me.
It comes in two "parts" and the second is a little tricker.
If you don't want to work out the solution for me that's fine, if you can just give me the math I need to do it I would be more than grateful.
I am trying to beat Amazing Turret Defence VORTEX solo. (apparently impossible, if so I want to at least give it a good shot)
+ Show Spoiler +I don't want to use any goliaths, archons, cannons etc.
I need to know how the optimal number of bunkers of which specific type to build, and how many upgrades to get, at any given time.
This might sound simple at first, and I'm sure I've seen this asked before and the relevant algorithm given, but searching has proved fruitless. This example is a little more specific and hopefully will prove an interesting challenge to those who like this sort of thing, so I thought I would just post it here for you all to try anyway.
Having good knowledge of this map as well as maths skills will certainly be benefical, though by no means essential.
The first thing I need is this:
Ignore unit range. Ignore damage type vs unit size.
First upgrade costs 1 mineral, second costs 2 minerals, third costs 3 minerals and so on
3 minerals = one supply depot = 3 marines = 45 base damage + 15 per upgrade 6 minerals = one academy = 3 ghosts = 60 base damage + 35 per upgrade 12 minerals = one armory = 3 marines = 75 base damage + 25 per upgrade 15 minerals = one observatory = 3 ghosts = 250 base damage + 65 per upgrade
Marine cooldown : 15 Ghost cooldown : 22
Which unit is the best to make? (on average) Is that unit always the best to make or only after a certain number of bunkers? When to build another bunker full of that unit type versus when to get another upgrade?
The second thing I need is this:
The solution to the first part may not be the same as the second, though solving the first will be an ideal foundation for solving the second.
Anyone who knows this map knows and has even the tiniest bit of faith in me knows that I am dying on..... yup you guessed it..... + Show Spoiler +
If you didn't know that already, you do now.
Thus the following is essential to consider: + Show Spoiler + We will continue to ignore unit range as it is irrelevant in this case.
First upgrade costs 1 mineral, second costs 2 minerals, third costs 3 minerals and so on
3 minerals = one supply depot = 3 marines = 45 base damage + 15 per upgrade 6 minerals = one academy = 3 ghosts = 60 base damage + 35 per upgrade 12 minerals = one armory = 3 marines = 75 base damage + 25 per upgrade 15 minerals = one observatory = 3 ghosts = 250 base damage + 65 per upgrade
Marine cooldown : 15 Ghost cooldown : 22
Concussive| Normal| Explosive Small| 100%| 100%| 50% Medium| 50%| 100%| 75% Large| 25%| 100%| 100% + Show Spoiler +Please excuse the shoddy layout of this table I have no idea why it won't respect my spacing!
Ghosts deal Concussive damage, Marines deal Normal damage. Corsairs are Medium sized units.
Also, Corsairs have 7k shields and 7k health, and ghosts will deal 100% damage to their shields and the standard 50% damage to their health.
Finally, there are a number of other factors including but not limited to sweet spots, stacking, the need to build marines (of any type) until enough to beat Wave 3 : Battlecruisers, the huge amount of money the BC's give you aaaaaaaaaand upgrading hard at the start of the round and using the extra minerals gained from extra kills to build bunkers later in the path but all of this is impossible to factor into these calculations and I'm pretty sure I can "wing it" with these aspects as I'm pretty good at this game. So ignore all of that.
I just need the "basics". (lol)
So! How do I beat these damn Corsairs ???????
|
Is it one upgrade for both marines and ghosts? If so, work out when the ghosts will be better for cost than marines, and make marines up until not long before that point imo. That said, I did not do the math. Important factors you are missing is the amount of money you have at each round/the start, and the waves 1-4 hp statistics.
|
Yes, it is the standard weapons upgrade in the ebay which upgrades them both.
I don't need you to consider those factors, as I mentioned there are a number of things to consider to do with this game that will be virtually impossible to include in these calculations.
Also, there are two different types of ghosts and two different types of marines, and I could "work out" by endlessly crunching numbers the answer to some of my questions but I would like a more elegant and efficient way of doing so.
With the information I have requested I hopefully can begin to devise my ultimate strategy!
|
dont build too much of the cheap units, only enough to survive the first 4 waves they will become obsolete once you have a decent number of upgrades
|
I only need cheap units to survive the first 3 waves. What you are saying is of course true and I've done that repeatedly however I don't think you understand how hard this game is.... that's why I'm asking for the math.
|
|
There are too many variables you are not accounting for to formulate an accurate mathematical model. For instance, the duration your units attack the units and how many units attack each unit. There is a difference in damage output whether you target one Corsair at a time or four Corsairs at a time. There are numerous other random variables (Like shield regeneration) that you also are not accounting for.
|
Although one thing is that the armory marines seem to be an inferior deal to the supply depot marines, but the super ghosts are better per cost than the weak ones. Even accounting for upgrades.
Edit: against corsairs, just halve all the ghost damage. And 125 + 32.5 x upgrade for 5x the cost of 45 + 15 x upgrade is pretty awful, and ghosts have a worse cooldown. So I'd stick with basic marines. If units don't stack nicely, you'll probably lose significant damage. Don't know why you need bunkers in this game either.
So for now, just the weak marines, since they're most cost effective:
D = X * (45 + 15 * N ) Cost = 3 * X + N * ( N + 1 ) / 2 =lambda D = ( Cost - N * ( N + 1 ) / 2 ) * (15 + 5 N ) dD/dN / 5 = Cost - (2 N + 1 ) * 3 / 2 - (3 N ^2 + 2 N) / 2 2 Cost = 6 N + 3 + 3 N ^ 2 + 2 N 3 N ^ 2 + 8 N + 3 - 2 Cost = 0 N = (-4 +/- sqrt( 16 - 9 + 6 * Cost) ) / 3 N = (sqrt(7 + 6 * Cost) - 4 ) / 3
Since upgrades have quadratic cost, obviously you should stop upgrading once you hit that value and only mass marines.
|
|
dead9 figured some equation and i plotted it came up with conclusion
generally this is true: do not get upgrade more than 36-37, just build lots and lots of bunkers (assuming you can stack them). bunkers add value much more than upgrades after a certain point (~37), which cost too much after that compared to lots of bunkers. i dont really know how many minerals you get in game but should be very true
assuming marines i suppose, im not sure what he was considering
|
You forgot to include enemies armor. If they have big armor points, then units giving higher damage per shot will be significantly more efficient, so building armories is the way to go.
|
Hey Reason,
I'm a big fan of using Excel (particularly Solver) to optimize such questions. I made a spreadsheet a while ago to answer a question just like this one, so I made a few modifications and uploaded it here:
http://www.mediafire.com/file/8pzh9auyu7lu767/Starcraft Fun.xlsx
It runs off of Solver, which is included in Excel. Usually you have to go to Excel Options -> Add-Ins -> Solver to access it.
When you pull up Solver (it should appear in either "Tools" or "Data" depending on the version of Excel), just hit "Solve" and it will optimize the spreadsheet.
Cells in green are up to you to modify. I've never played this particular Tower defense game so I don't know what the mineral situation is like, but enter in the amount of Minerals you have available into the "Money Available" field, and then input how many units/upgrades you've already purchased into the green cells on the top. Then run Solver and the red cells at the bottom should tell you the optimum placement of those minerals.
The "Damage Reduction" fields can be used to take into account the Ghost's concussive attacks. I have it preset to 25%, which is the average reduction against Corsairs (100% against the half of shields, and 50% against the half that is health), but you can change it to reflect any particular enemy you're fighting against.
Playing with it, it appears that massing Academys with some Upgrades would be the best way to go if all the enemies were small, but massing Supply Depots with some Upgrades is better in any case where the enemies are not small.
Sorry for the longwinded post--if you need help with the Excel sheet or spot any bugs, just let me know.
Hope this helps, Rut
|
But 5 depots is 225 + 75 *upgrade while observatory is 250 + 65 *upgrade In 3 upgrades, the supply depots have a higher dps per cost, and that's not including the cooldowns. Taking cooldowns into account, the marines get a 50% dps boost.
So either the numbers are wrong (conceivable, since the last ghost stats aren't divisible by 3 while the previous stats were) or ghosts are terrible dps.
|
Thank you guys so much for your excellent responses!
igotmyown you are exactly what I was looking for you obviously unfamiliar with this game :"Don't know why you need bunkers in this game either. but you helped me out anyway,thanks man. Just to let you know when you build a supply depot/academy/armory/observatory when it is finished building it turns into a bunker with 3 of the relevant unit standing next to it which autoload inside. So "bunker" is the general term for "another 3 units". Hope that makes sense now
Unfortunately what you wrote is way above my head. I think posters after you have already completely solved what I'm asking but I'm interested to understand exactly what you did there so I am going to try to understand, please help me out here! D = X * (45 + 15 * N ) i think Damage = The number of bunkers * (45 + 15 * the number of upgrages) Cost = 3 * X + N * ( N + 1 ) / 2 =lambda yeah im lost now lol ... help! I know lambda has a value of 30 but I don't think that's how you are using it here...
Hidden_MotiveS you are a legend! This is exactly what I was looking for! I'm sure I've seen this exact post before I just wish I knew the title so I could find it. This is a really great post, not just because it covers exactly what I'm asking but it's a high quality post and I can't believe all you got was 13 off topic responses not one thanking you for doing this for all future Turret Defencers or commending your great 1000th post! Much overdue props to you
rabdich thanks for your input though you were not to know the most upgrades I can reasonably get by Wave 5 is around 15-30 without just spending every penny on bunkers and having waaaay to few which is suboptimal so I will definitely need to the information provided by the other guys to find out the optimal way to play up until that point, however it will be interesting to see if I can beat them if your 36/37 limit holds true. I'll post results here if I make it that far.
Endy you are right I should have said the Corsairs have 30 armour, however the sheer number of units + upgrades I have by this point means that the 30 armour I *think* won't matter much since I need to deal 14k damage to each Corsair and there are hundreds of them! However since I am dealing this damage over thousands of small shots it may indeed change which is the most effective even though it seems such a small number so I will definitely check this out. Hopefully some of the spreadsheets can factor this in, if not I will find a way to do it by myself (unless I am unable and come back begging for more help )
Rut thanks a bunch for modifying that sheet to fit this example, I will definitely crunch the numbers in that as well just to confirm all the previous data. I might even end up using your one solely, I will see which is easier to use. You are correct the damage penalty is 25% and not 50% as igotmyown said because the ghosts deal full damage to shields but 50% to the HP and they have equal shields and health.
igotmyown I didn't display the information clearly which is my bad but because all bunkers have 3 guys it didn't seem important and I overlooked this. Each bunker contains 3 units and EACH unit deals the damage I have described. So for 15 minerals you get 3x250+65*upg.
Ok I'm going to try and use the tools you lot have given me and hopefully I can do a better job than I have been. Will post again soon.
|
I deleted Excel a few months ago because I have never used it except opening it occasionally by accident and it was pissing me off. My computer got a ramnit worm which affected a lot of files and I had to do a lot of scanning etc so I basically deleted every non-essential thing on my computer in the process.
Crap. I'm downloading OpenOffice and I hope to this will work. Alternatively google has a spreadsheet function I believe so I may be able to use that. If anyone can give me Excel or tell me how to get it for free or give me any other suggestions I would appreciate it.
Yes, I am aware I suck big time.
I am interested... does someone know how to plot this graphically?
The reason I ask is because in this game the units start at the start and end at the end, surprisingly...
If there is a slightly less optimal way to do it... say instead of 40 bunkers and 20 upgrades but to have 30 bunkers and 40 upgrades (yes I know those figures are compltely wrong) it may be better to do it this way because I will be dealing more damage at the start and earning more minerals and I can create bunkers later in the unit path and actually achieve a greater amount of total damage by the end of the round. If this is not enough information I can provide more that you ask for as long as it is possible for me to do so.
Edit: So I've given some information in a later post...
The reply so far seems to say 17 upgrades, but I could make 18 before the first Corsair appears then in theory construct the required bunkers later in the path, which would actually be better (more damage dealt)... can anyone plot this graphically as if there as an alternate slightly less optimal solution heavily favouring upgrades this might actually be better in practice as I get money for kills throughout the round and can build the bunkers near the end of the path anyway.
|
They typically use lambda in constraint equations for lagrangians (though I wrote it wrong), so it's nothing important. I realized it didn't make sense, so I called it cost instead.
The equations are annoying to use, but the simplest one to apply is 2 Cost = 3 N ^ 2 + 8 N + 3 where N is the upgrade level, cost is how much you are allowed to spend on units/upgrades. + Show Spoiler [other equations] + 2 Cost = 6 x + N^2 + N 6 X = 2 N ^ 2 + 7 N + 3 so X = (2 N ^ 2 + 7 N + 3) / 6, where X is the number of supply depots.
If I want X in terms of Cost, I have to use that ugly quadratic from the first point, plug it back in, and solve. I don't want to do it by hand, so symbolic math program, go: X = 2/9*Cost-11/54+5/54*(7+6*Cost)^(1/2)
Or Cost in terms of X Cost = 9/2*X+23/16+5/16*(48*X+25)^(1/2), 9/2*X+23/16-5/16*(48*X+25)^(1/2) (it's probably the + equation) And this is why I recommended the easier equations.
+ Show Spoiler [examples of total cost given upgrade l…] +So at what total cost is 1 upgrade worthwhile? 3*1+8*1+3 = 2 * Cost Cost = 7 Which happens to be 2 supply depots + 1 upgrade, which is correct. When is 2 upgrades worthwhile? 3*4+8*2+3=2*cost 2*cost=31 cost=15.5 So when you spend a total of 31, 2 cost upgrades is worth it. Which means you spend the remainder 28 minerals on 9.3 supply depots.
In general, upgrade N is worth it when you spend (3 N ^ 2 + 8 N + 3) / 2 total and to calculate the bunker cost, subtract (N^2 + N ) / 2, the total upgrade cost, from the total cost and divide by 3.
The 30 armor might matter, especially if it also applies to shields.
So if you can tell us the total money you have/have spent when you reach corsairs, we can just plug it in.
|
Ok. I beat Battlecruisers with 51 bunkers and 15 upgrades. I can do this with a few more upgrades and a few less bunkers or vice versa, I'm guesing thats not the best spread. After Wave 3: BC's I have 170 minerals spare!!!!
I beat Wave 4: Scourge with only 1 more upgrade and 10 more bunkers, so at the start of Wave 5: Corsairs I had even more money to the tune of 195 minerals spare... the point is scourge are easy and I could beat them even if I massed the worst unit in the game or massed upgrades beyond their usefullness.
So. 170 minerals after BC's or 195ish after Scourge if the figure I have.
51 bunkers + 15 upgrades = 51x3 + (1+2+3+4+5+6+7+8+9+10+11+12+13+14+15) = 103 + 120
= 223 minerals spent, 170 minerals spare. After the Battlecruisers.
Corsairs have 30 armour, 0 shields. 7k shields and 7k health.
|
273+170=443, after bcs
Scourge, extra 16 for upgrade and 30 for bunkers, or 46, with 195 to spare So 273+46+195=514
Upgrade = (sqrt(7 + 6 * 514) - 4 ) / 3, ignoring armor. which is 17 upgrades.
If you don't ignore armor, half the time your marines are losing 0 damage and half the time 30, so on average you're losing 15.
I'm going to shove Damage = ( Cost - N * ( N + 1 ) / 2 ) * (30 + 15 N ) into a symbolic math thing because I'm getting too lazy N = -1+1/3*(3+6*Cost)^(1/2)
So for 514 cost, N=17.5
Are bigger marines better against corsairs? 45-15 + 15N vs 75-15+25N for 4x the cost No, they're not
Are super ghosts better? Half the time they do 50%, half 100%, so they average 75% listed damage So 30+15N vs 187.5 + 48.75 N Comparable base damage, vastly inferior upgraded damage ,and you still get an additional extra 50% marine damage from cooldowns.
So the answer to corsairs (assuming 514 minerals) is 17 upgrades, rest in basic marines.
|
Wow I've been massively overupgrading
Thanks for everything so far, as usual I still have more questions.
You have said with the allotted 514 minerals its 17 upgrades and the rest in basic marines, what do you think about the graph thing I mentioned? Do you understand what I mean about going to 18 upgrades then building bunkers later?
Also, just on the pure maths side of things which you definitely seem to be handy with, you have said 17 upgrades and the rest in bunkers, which is clearly more money into bunkers.
I'm assuming 18 upgrades and less bunkers gives less damage then, can you calculate when the next best point would be with more than 17 upgrades? and the next? and the next? That's why I'm suggesting a graph as an easy way to display this information, I tried to draw it how I think it might look too .... if it turns out 24 upgrades and a LOT less bunkers is only marginally worse, this would in fact be a lot better as I could deal a lot of damage early then mass bunkers at the end and deal even more damage.
Is this going to be a straight line graph or is is possible that 20 upgrades and the rest in bunkers can be better than 19 upgrades and the rest in bunkers, though not at as good as 17 ugprades and the rest in bunkers?
|
I'm assuming you can't upgrade during the round but can build units for whatever reason. You can reach your ideal upgrade before the round then add units during, I suppose.
I don't know what the units of the graph.
Given that you gained <200 gold the round before, here's the upgrade vs cost break points (after you reach those upgrades, all further upgrades at the cost of bunkers will decrease your overall damage) 17: 503 18: 554.5 19: 619 20: 681.5 21: 747
Edit: I did the ghost calculation wrong, it's the average of full damage without armor and 50% with armor, but I included armor in both cases. But marines are still better.
|
|
|
|