Natural Selection Economy Simulator

zubatazubata Join Date: 2003-02-04 Member: 13090Members
<div class="IPBDescription">..check it out</div> People are arguing all the time what number of gorges is optimal or what building order is optimal etc. but their opinions are mostly based on intuition, not on hard calculations. I thought that I could make a tool to calculate this kind of stuff. So I wrote a web page heavily based on javascript (MSIE 5 required, sorry) which purpose is to simulate Natural Selection "economy".

You can see two panels, one for marine team and one for alien team. Those panels show you what res they got, what buildings they built, state of hives, species of players and similar things. You can build structures, upgrades, hives, evolve aliens. You can even kill aliens (this has influence on economy) or let the program kill them randomly. Time is advanced by seconds or by ticks or until given alien players gather given res amount.

You can execute different building orders and the program will show you that e.g. third DC would be reached at 5th minute and second hive started at 9th minute.

I regard this program to be in beta stage - I hope it works fairly well but it's really not flawless.

Unfortunately I am not a NS developer so my insight into the real thing is quite limited. We have no accurate description how the game really works. E.g. the developers said that the tick length is 6 seconds but actually alien tick length is 5 seconds .... on the other hand, aliens per-tick income seems to be adjusted so the real income seems to be as if the alien tick was really 6 seconds ..... Another problem is with times of building of structures which are dependent on fps. Same with the time it takes to evolve to certain liveform. And there are other problems .... Fortunately many of these inaccuracies do not have important impact on the results.

But it seems that the simulation is fairly accurate, at least at the beginning of the game (which is the important phase).

The link is
<a href='http://nakyveci.wz.cz/NSEcoSim.html' target='_blank'>http://nakyveci.wz.cz/NSEcoSim.html</a>

Take a look and tell me your opinions/suggestions/corrections :-)
«1

Comments

  • pardzhpardzh Join Date: 2002-10-25 Member: 1601Members
    I think that's pretty nifty.

    But when I tried to add another Alien, it crashed my browser. <!--emo&:(--><img src='http://www.unknownworlds.com/forums/html/emoticons/sad.gif' border='0' style='vertical-align:middle' alt='sad.gif'><!--endemo-->
  • AngaDraugAngaDraug Join Date: 2003-02-27 Member: 14075Members
    Thats all well and good, but why don't you just play the game?

    ***KILL THE FATTY***
    <!--emo&::asrifle::--><img src='http://www.unknownworlds.com/forums/html/emoticons/asrifle.gif' border='0' style='vertical-align:middle' alt='asrifle.gif'><!--endemo--> <!--emo&::gorge::--><img src='http://www.unknownworlds.com/forums/html/emoticons/pudgy.gif' border='0' style='vertical-align:middle' alt='pudgy.gif'><!--endemo-->
  • DizzyOneDizzyOne BASS&#33; Join Date: 2002-11-17 Member: 9095Members
    this is ver nice!
    thx dude <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->, im busy comparing tactics with it <!--emo&:D--><img src='http://www.unknownworlds.com/forums/html/emoticons/biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif'><!--endemo-->
  • Frogg2Frogg2 Join Date: 2002-11-02 Member: 4867Members, Constellation
    This demostrates the fundemental flaw with the game very well.

    The marines had an IP an Armory an Armslab 3 RTs Armor Upgrade Weapon Upgrades then the Aliens 2nd RT finished <!--emo&???--><img src='http://www.unknownworlds.com/forums/html/emoticons/confused.gif' border='0' style='vertical-align:middle' alt='confused.gif'><!--endemo-->
  • Frogg2Frogg2 Join Date: 2002-11-02 Member: 4867Members, Constellation
    Perhaps you could add in the time it takes to research marine tech. Also I noticed a bug that aliens only rein 1 at a time even though 2 hives were up.
  • coilcoil Amateur pirate. Professional monkey. All pance. Join Date: 2002-04-12 Member: 424Members, NS1 Playtester, Contributor
  • ZelZel Join Date: 2003-01-27 Member: 12861Members
    <!--QuoteBegin--Frogg2+Mar 20 2003, 10:15 AM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Frogg2 @ Mar 20 2003, 10:15 AM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> This demostrates the fundemental flaw with the game very well.

    The marines had an IP an Armory an Armslab 3 RTs Armor Upgrade Weapon Upgrades then the Aliens 2nd RT finished <!--emo&???--><img src='http://www.unknownworlds.com/forums/html/emoticons/confused.gif' border='0' style='vertical-align:middle' alt='confused.gif'><!--endemo--> <!--QuoteEnd--> </td></tr></table><span class='postcolor'> <!--QuoteEEnd-->
    yeah, how often are marines allowed to ahve three RT's without spending a dime on mines or turrets? not often. pretend your skulks did something successful and the marines will slow down.
  • NarfwakNarfwak Join Date: 2002-11-02 Member: 5258Members, Super Administrators, Forum Admins, NS1 Playtester, Playtest Lead, Forum Moderators, Constellation, NS2 Playtester, Squad Five Blue, Reinforced - Supporter, Reinforced - Silver, Reinforced - Gold, Reinforced - Diamond, Reinforced - Shadow, Subnautica PT Lead, NS2 Community Developer
    Whoa, this is cool. I hope the PTs can use it to the benefit of the game.
  • Frogg2Frogg2 Join Date: 2002-11-02 Member: 4867Members, Constellation
    Happens all the time in clan matchs/scrims
  • DreadDread Join Date: 2002-07-24 Member: 993Members
    edited March 2003
    GJ! Btw, I think you forgot siege.

    Sticky this.
  • USCMLieutenant_RipleyUSCMLieutenant_Ripley Join Date: 2002-11-24 Member: 9818Members
    edited March 2003
    Very impressive. Normally, these "types" of statistical tools are crap, but this one is a near perfect design and perfect is a STRONG word. I note that there is no way to indicate that multiple gorges are building a structure...which relates the tactics I wanted to assess.

    [Edit] omg, it's all javascript....oh the humanity....I commend your dedication to JS <!--emo&:D--><img src='http://www.unknownworlds.com/forums/html/emoticons/biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif'><!--endemo--> Some bugs. Counts dead aliens in "advance until", hives, etc.
  • AnavrinAnavrin Join Date: 2002-10-30 Member: 1734Members
    This is actually neat.

    Looking forward to a final version of it once everything's included. Is the resource generation rate formula the same as the "# of players" based one in 1.04?
  • p00psm1thp00psm1th Join Date: 2003-02-14 Member: 13558Members
    it also lets me build armory before ip and stuff like that

    great page tho
  • masterswordmanmasterswordman Join Date: 2002-12-21 Member: 11303Members
    its great, if only I was smart enuf to use it *sigh*
  • Lumberjack_WannabeLumberjack_Wannabe Join Date: 2003-03-11 Member: 14404Members, Constellation
    My final conclusion:

    For a 1 Marine team, you need 266 RTs in order to get 3114.1 resources in 30 seconds.
  • masterswordmanmasterswordman Join Date: 2002-12-21 Member: 11303Members
  • HeistHeist Join Date: 2002-11-09 Member: 7922Members
    I now wholeheartedly believe that skulks making idiots of themselves and rushing helplessly into death is a good thing.
  • zubatazubata Join Date: 2003-02-04 Member: 13090Members
    > Duff-Man
    > But when I tried to add another Alien, it crashed my browser.

    People often tell me that their IE crashes but it never happened to me :-/ What is the version of your IE ? I tried it with 5.0 and 6.0, no crashes


    > AngaDraug
    > Thats all well and good, but why don't you just play the game?

    The point is not to replace NS, the point is to experiment with "what will happen if ...".
    You can't do this so easily by actually playing the game.


    > Frogg2
    > Perhaps you could add in the time it takes to research marine tech.
    > Also I noticed a bug that aliens only rein 1 at a time even though 2 hives were up.

    I did not include research times because I considered it irrelevant to the main goal of the program - simulation of resource flow. But I changed my mind - this is certainly useful.

    Regarding the REIN issue, I guess the reason is that REIN time is determined when the alien is killed. So when you kill an alien right before hive construction is finished, this could happen (REINforcing alien won't use the new free hive). If this is the case, then I think its not worth fixing ;-)


    > *Dread*
    > GJ! Btw, I think you forgot siege.

    Actually you can "buy" anything via the "Spend res" button, you can't see number of built sieges though. I think that number of sieges is not important but I will probably add it.



    > [USCM]Lieutenant Ripley>
    > Very impressive. Normally, these "types" of statistical tools are crap, but this one is a
    > near perfect design and perfect is a STRONG word.

    Thank you, I am surprised that you like it so much, there is certainly much room for improvements <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->

    > I note that there is no way to indicate that multiple gorges are building a
    > structure...which relates the tactics I wanted to assess.

    I may add this (already suggested by someone else) but do you know how does this influence the construction time ? I guess that each gorge builds a "constant bit" each video frame.

    > [Edit] omg, it's all javascript....oh the humanity....I commend your dedication to JS

    LOL javascript rulez <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->) I like that only about 50 lines of the code from the overall 1419 is HTML <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->

    > Some bugs. Counts dead aliens in "advance until", hives, etc.

    Dead aliens are shown intentionaly in the "advanced util" dialogue, why should they be excluded ? But I don't get what did you mean with "hives, etc." ?




    > Anavrin
    > Looking forward to a final version of it once everything's included.
    > Is the resource generation rate formula the same as the "# of players" based one in 1.04?

    The basic formula is this:

    (1 + numRT * numTeamPlayers * 0.23) * (numEnemyPlayers / numTeamPlayers)

    Dead players ARE counted.

    This formula is being applied each tick. For marines, this is just added to the team's
    resource account. But for aliens, the outcome of this formula is multiplied by 5/6. This is adjustment which negates consequences of shorter alien ticks (5 instead of 6 seconds).

    Actually, I just found that this adjustment got removed by accident from the source, I am returning it back ASAP.



    > p00psm1th
    > it also lets me build armory before ip and stuff like that

    Indeed, I gave up on checking stuff like this, it's up to you <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->


    > masterswordman
    > its great, if only I was smart enuf to use it *sigh*

    try click the "Confused ?" button <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->
  • Lumberjack_WannabeLumberjack_Wannabe Join Date: 2003-03-11 Member: 14404Members, Constellation
    It's great, especially to fool around with....

    If there was a map with 500 resource points...
  • MaTTMaTT Join Date: 2002-11-01 Member: 3033Members
    hmmm.... crashes on me occasionally with latest IE6 + updates...
  • BigDBigD [OldF] Join Date: 2002-10-25 Member: 1596Members
    Neat! But I had 10 marines, thought I'd balance the aliens... but when I clicked for number 10... bye bye browser. It's IE 6.0 just so you know.
  • DoppleDopple Join Date: 2002-12-31 Member: 11698Members
    Your layout is totally screwed up in NS 7/Mozilla/Phoenix. I ran your page through the W3C's HTML validator, and the page doesn't even have a DOCTYPE or character encoding. I also ran your page through Dreamweaver MX's validator, and there are several Javascript errors as well.

    Yes, I do know it requires IE 5, but it's not Mozilla that's broken, it's the page; it renders in IE because IE is extremely forgiving when it comes to HTML.


    <a href='http://validator.w3.org/check?uri=http%3A%2F%2Fnakyveci.wz.cz%2FNSEcoSim.html' target='_blank'>Fix these errors and you're set</a>
  • zubatazubata Join Date: 2003-02-04 Member: 13090Members
    Those crashes are bothering me :-/ does it happed during particular operations, or randomly ?


    > Yes, I do know it requires IE 5, but it's not Mozilla that's broken, it's the page

    Dopple, it's not broken, I just wrote it for IE, not for W3C, that's all. I gave up on mozilla because of modal dialogues and lack of innerHTML property. Maybe it's just lack of mozilla knowledge on my side (I work with IE-based intranets), but it seems that it is unusable for my purpose. The simulator is no stupid ordinary HTML page.

    Everyone who plays NS has windows and IE, too. Btw I use mozilla for general web browsing, not IE.
  • DeaconDeacon Join Date: 2002-11-24 Member: 9852Members, Constellation
    I'd be keen to see a CLI version, so you could feed it map and player-number data, and have it play out a game in-memory. You could use it to analyze which sides/build orders worked best on which maps.

    Pretty neat as-is, though.
  • The_SpectreThe_Spectre Join Date: 2002-11-18 Member: 9212Members
    Very nice! <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->

    I have three suggestions:
    1. Would it be possible to add "the Marine Team" in the "Advance until..." dialog, as an extra player? For when you're doing marine builds.

    2. Not really a suggestion, but a possible error: I'm fairly sure the marines costing 1 res to spawn is a rumor, a widespread rumor, but just a rumor. It certainly doesn't do this in casual mode, and it is also not mentioned in <a href='http://www.unknownworlds.com/forums/index.php?act=ST&f=22&t=9368' target='_blank'>This</a> post. (The differences between tournament and casual mode)
    In the mean time, for people using this, you can just set marine average lifespan to something crazily high, like 100000 seconds, to disable this part.

    3. A simple "Advance By __ seconds" so you can control the time more easily than with only 1, 5, 6, 30 seconds as options.

    Once again, great program!
  • JHunzJHunz Join Date: 2002-11-15 Member: 8815Members, Constellation
    Well, it seems to work pretty well in Opera 7

    I don't see any way to factor in recycling structures, perhaps this can be included in the next version <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->
  • zubatazubata Join Date: 2003-02-04 Member: 13090Members
    Regarding crashes .... I think I found the problem (IE bug) and worked around it. Crashes that followed adding and deleting alien players do not seem to accur anymore.


    Spectre:

    <!--QuoteBegin--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->1.<!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->

    thats reasonable

    <!--QuoteBegin--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->2.<!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->

    AFAIK it applies to casual mode, too ... got to test it somehow ...

    <!--QuoteBegin--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->3.<!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->

    ok


    <!--QuoteBegin--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->JHunz: recycling structures<!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->

    This might require major redesign of marine team data model and GUI but I will consider it.
  • coilcoil Amateur pirate. Professional monkey. All pance. Join Date: 2002-04-12 Member: 424Members, NS1 Playtester, Contributor
    To my knowledge, neither Casual nor Tournament Mode features a respawn cost for marines.
  • hoju2hoju2 Join Date: 2002-11-04 Member: 6873Members
    edited March 2003
    Wow that is one of the greatest things a community has produced, but I can't believe this is an accurate representation. My Marines built: <ul>
    <li>3 RTs + the one they start with
    <li>1 IP
    <li>Armory - Later Upgraded
    <li>Arms Lab
    <li>Lvl 1 Weapon and Armor Upgrades
    </ul>

    In the time it took a 1 Gorge Alien team to build a mere 2 RTs either theres a math error somewhere or there are some big problems with the NS economy that needs to be worked out.

    For future versions of your website I have a few suggestions: you should observe a match between medium skill players and get a general number of how long it takes for them to die (unless you have already) and have that number automatically change with each Armor/Weapon/Carapace upgrade. Also the Advance Until button needs to have the Marines too.
  • ProphyleProphyle Join Date: 2002-11-02 Member: 4499Members
    I'm very sorry that I can't use internet explorer.
    Why do you have to write it in non-standard javascript? I would be very interested, but I'm using Linux and not Windows.
Sign In or Register to comment.