Fractal Softworks Forum

Please login or register.

Login with username, password and session length

Author Topic: Rainbow Tables  (Read 2849 times)

Vulpes

  • Ensign
  • *
  • Posts: 43
    • View Profile
Rainbow Tables
« on: October 01, 2012, 11:38:07 AM »

So, I was thinking of the shortcomings demonstrated by auto resolve and came up with... something. To my understanding rainbow tables have basically been computed in advance- could we do a similar thing with starfarer battles? we could throw together something like a list of fleet combinations with varying hull/armor damage %, crew level and supplies.
Multiple smaller battle results could randomly be used to decide on the fate of large fleets, seeing as there's a limit to the number of units one can field.  I'd imagine that modders could either be given the option of generating their own tables or letting the current auto-resolve take over.

This may be too much work but I thought that it was worth mentioning.  I understand that auto-resolve should be risky for the player, but as I understand it Starfarer will be a very large and complex universe, which probably means lots of AI fleets colliding with one another- something the player has no direct control over yet will still be affected by and so it seems silly to have (sometimes) seemingly random battles play out:

I once decided to auto resolve one Lasher and one fully equipped thumper onslaught against a few pirate frigates, a Buffalo and something else small (I forget)... I actually had the Onslaught die more than once in the number of tests I did, which certainly wasn't over 20.
Logged

Thaago

  • Global Moderator
  • Admiral
  • *****
  • Posts: 7221
  • Harpoon Affectionado
    • View Profile
Re: Rainbow Tables
« Reply #1 on: October 01, 2012, 01:04:56 PM »

[edit] What is below is actually not for rainbow tables, but for a complete lookup table. Now that I did a little more reading :P : rainbow tables are really cool, but not really applicable to this problem.

While it would produce more accurate results for those battles that are in the table, constructing a table with all battles would be prohibitively expensive. The number of entries in the table (assuming an upper diagonal form) goes as n*(n+1)/2, where n is the number of different fleet configurations. With 100 fleet points and ~20 ships, the number of fleet configurations is gigantic... certainly greater than 185,000 (~ 20 choose 10, ballpark estimate) which would make the table have 17 billion entries. At 5 seconds per full battle simulation this would take ~162,000 years to make :D. Thats not even all of them, with absolutely nothing about weapons, officers, damage levels... (Welcome to combinatorics!)

Ok, ok, we wouldn't actually make the whole table - we'd just try to make a few representative samples. But then we'd need some way to get from a table entry to the real battle - say one side has an extra frigate compared to the entry so give them a bonus and they are using more kinetic so... but thats not really any better than the system we have now. :D

I do think the current autoresolve needs a few tweaks, but on the whole its sound.
« Last Edit: October 01, 2012, 01:41:16 PM by Thaago »
Logged

xenoargh

  • Admiral
  • *****
  • Posts: 5078
  • naively breaking things!
    • View Profile
Re: Rainbow Tables
« Reply #2 on: October 01, 2012, 04:53:52 PM »

A better way to handle this issue, imo at least, is to take range into account.

Iterate starting with ranges, from 10K to 0, in increments of 100; then weapons engage if they're valid, hits are declared, etc.

That'd fix a lot of issues; also assigning a random chance of missile interception per PD weapon on the target ship would help make things work a little more realistically.
Logged
Please check out my SS projects :)
Xeno's Mod Pack

Gothars

  • Global Moderator
  • Admiral
  • *****
  • Posts: 4403
  • Eschewing obfuscatory verbosity.
    • View Profile
Re: Rainbow Tables
« Reply #3 on: October 01, 2012, 06:41:01 PM »

I thought about some kind of warning function. The outcome of an autoresolved battle gets pre-calculated and if you (would) loose ships there's a warning. Something like: "your first in command has trouble keeping the enemy in check, would you like to take over?". And then you could take over the battle, with some ships already deployed and (the ones you would have lost) damaged. That way you could avoid frustration about loosing ships unexpected and unnecessarily with autoresolve. And the function would not need to be quite as perfect as everyone would like it to be now.

Is this a good idea?
« Last Edit: October 01, 2012, 06:44:49 PM by Gothars »
Logged
The game was completed 8 years ago and we get a free expansion every year.

Arranging holidays in an embrace with the Starsector is priceless.

xenoargh

  • Admiral
  • *****
  • Posts: 5078
  • naively breaking things!
    • View Profile
Re: Rainbow Tables
« Reply #4 on: October 01, 2012, 07:31:01 PM »

I'd like that; I'd also like Autoresolve to be slightly slanted in the enemy's favor; right now, when you have a big fleet with a lot of DPS, Autoresolve often gives better results than fighting it out does.
Logged
Please check out my SS projects :)
Xeno's Mod Pack

DNAz

  • Commander
  • ***
  • Posts: 112
    • View Profile
Re: Rainbow Tables
« Reply #5 on: October 02, 2012, 02:32:20 AM »

I'd like that; I'd also like Autoresolve to be slightly slanted in the enemy's favor; right now, when you have a big fleet with a lot of DPS, Autoresolve often gives better results than fighting it out does.

Having the second in command be an actual character should fix that. No character unless maxed should be able to do as well as the current autoresovle I think.
Logged

Vulpes

  • Ensign
  • *
  • Posts: 43
    • View Profile
Re: Rainbow Tables
« Reply #6 on: October 05, 2012, 06:59:02 AM »

Now that I think about it this probably be more applicable when considering AI fleets... whether anyone cares about those is another matter entirely.
Logged