Grid Sage Forums

Grid Sage Forums

  • November 21, 2024, 04:06:39 PM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

News:

LINKS: Website | Steam | Wiki

Author Topic: Power optimizer  (Read 5174 times)

Decker

  • Cyborg
  • ***
  • Shared a Confirmed Stealth Win Bug Hunter Supported Cogmind Alpha Access 2015-2017 (Prime Tier) Weekly Seed Participant Shared a Confirmed Combat Win
  • Posts: 172
    • View Profile
Power optimizer
« on: February 05, 2016, 03:39:01 PM »

In my last run, I came across this weird prototype called "power optimizer". I was like, what the hell is this? It turns out this thing is amazing!

I'm used to shut down my hover units when I'm building up too much heat while fighting. At least once per game, I forget to turn them back on and I go like "NoooooOOOOOOoooo" as I retreat with speed 2000 under fire from 3 hostiles.

Well, with this shiny little bundle of joy, there's no more need for that! It automatically stops sending power to my hover units when it figures there's no need for them to be powered on. It even powers on my treads so that I get automatic recoil reduction! It all happens under the hood and it doesn't change the permanent state of anything.   

It works in many other cases, too. When I swap out my terrain scanner, it stops powering my terrain processor. When I'm not firing, it disables my targeting computers and other offensive items. Conversely, when I'm not moving, it disables my gravity apparatus, unless it causes me to lose my flight bonus.

It's even able to do smart power / heat sink management. I was wondering how it did that, so I checked the assembly code and it really isn't that complex. Basically, it greedily powers on my reactors while I'm missing power, and it does the same for heat with the heatsinks. That's done in a loop, because reactors create heat and heat sinks drain power.

Anyway, it really streamlines the game. I hope to find it again in my future runs.
Logged

Kyzrati

  • Administrator
  • True Cogmind
  • *****
  • Posts: 4477
    • View Profile
    • Cogmind
Re: Power optimizer
« Reply #1 on: February 05, 2016, 08:13:24 PM »

Funny, we already have a thread for this :P

This is actually a hugely complex issue, and in some cases starts to have the game making decisions for you that you might not want made. Then there needs to be options for determining what it will and will not do.

Having the game make many decisions on your behalf is not very intuitive, because different players will react to different situations differently, and I also think that a part of the game is properly managing the active states of your parts.

Sure we could come up with a long list of rules and conditions under which the game will do what is obviously best, but once you have a couple dozen parts the options are not always so clear cut, some changes will cause complex chain reactions, and being familiar with what these automated features are and how they're reflected in the interface can become as much of a burden as simply remembering what systems you're using and managing it yourself.

Still, I have been meaning to revisit this eventually (because that other topic is still open), so feel free to discuss further.

My current disposition: No.
Logged
Josh Ge, Developer - Dev Blog | @GridSageGames | Patreon

Decker

  • Cyborg
  • ***
  • Shared a Confirmed Stealth Win Bug Hunter Supported Cogmind Alpha Access 2015-2017 (Prime Tier) Weekly Seed Participant Shared a Confirmed Combat Win
  • Posts: 172
    • View Profile
Re: Power optimizer
« Reply #2 on: February 06, 2016, 08:04:37 AM »

My initial proposal may have been too ambitious, e.g. for parts that may trigger chain reactions. Here's another proposal with reduced scope to address your concerns.

1) The game doesn't make decisions for you. No need for options.
2) The change doesn't affect parts with side effects.
3) No UI change required.
4) The rule is simple so that players can remember it easily.

Rule: the parts with no side effects are power-gated. The rule can be explained with a few lines in the manual, or with a one-liner in every power-gated part.

List of parts power-gated (Adrius stated other cases that might be worth considering):
- Power sources.
- Heat sinks.
- Offensive utilities.
- Signal interpreter and terrain scan processor.

These parts only do one thing. Gating them off when either they can't do their thing or there is no need to is straightforward. There are no decisions taken, no UI change required. The reported energy/heat upkeep just corresponds to the worst case scenario. The rule to remember is a small price to pay for the convenience.

Quote
I think the numbers are generally fudgeable enough that you shouldn't usually need to worry about a little extra lost energy to perform well enough. I do occasionally realize the need when things get down to the wire, but that shouldn't be happening around every corner.

My chosen build includes 2 power sources, some targeting computers, and a terrain processor and scanner. I can't keep all of that powered when moving or fighting. I have to toggle the parts before and after every single fight. I think that matches "happening around every corner". Now, if my parts were properly power-gated when I swap my terrain scanner with my heat sink, that would remove a lot of the pain.

Also, the tension between optimal play and baby-sitting parts is aggravating to min-maxer players. I don't care that it's a only a little energy/heat left or right. I just don't want to waste it. You never know when it might make a difference.

Quote
    When not moving, hovering units also waste your energy.

But they can give you a bonus to dodge if you have Maneuvering Thrusters or Reaction Control Systems, which a lot of hovering robots will tend to attach.

How about removing the upkeep for hover units altogether? The effect is fairly minimal while moving, and it gets annoying when fighting (optimal play is to turn off all of them, or just leave one activated to get that dodge bonus).
Logged

Kyzrati

  • Administrator
  • True Cogmind
  • *****
  • Posts: 4477
    • View Profile
    • Cogmind
Re: Power optimizer
« Reply #3 on: February 07, 2016, 08:34:22 PM »

It's still more complex than you're making it out to be, even with your shortened list--there are cyclical dependencies between power sources and other parts. Or heat sinks and other parts. While it's possible to apply this feature piecemeal to some parts in order to avoid those dependencies, for example only not taking unused heat sinks into account, the inability to apply this to all parts will leave some people confused.

I can see some cases where outright automated deactivation of a part would be beneficial, but singling out parts or even groups of disparate parts for this behavior will make the system feel too inconsistent. Inconsistency is bad.

This approach is also unable to answer a fundamental question: Which parts get priority for "gating" or deactivation when there is enough power for some but not others? It would be more clear-cut if there weren't multiple varieties of power sources, heat sinks, etc. that have varying potentials with trade-offs.

I know the current system might grate on min-max players, but I'd prefer to address this as best as possible using other means, for example:
Quote
How about removing the upkeep for hover units altogether? The effect is fairly minimal while moving, and it gets annoying when fighting (optimal play is to turn off all of them, or just leave one activated to get that dodge bonus).
My preference here is to introduce meaningful reasons for keeping them activated. So as of Alpha 7 you'll get a +5% dodge bonus while hovering (if not overweight), and being overweight will also cancel the benefit of Maneuvering Thrusters.

(Also, you know there's a shortcut to toggle all propulsion at once, right?)

With regard to processors, another possibility I've considered is complete removal of all of their upkeeps. This would be a rather big change and have several repercussions, but without getting into those here just yet, what does everyone think?
Logged
Josh Ge, Developer - Dev Blog | @GridSageGames | Patreon

Sherlockkat

  • Cyborg
  • ***
  • Bug Hunter Shared a Confirmed Stealth Win Supported Cogmind Alpha Access 2015-2017 (Prime Tier)
  • Posts: 126
    • View Profile
Re: Power optimizer
« Reply #4 on: February 07, 2016, 10:02:38 PM »

I don't know. Removing their upkeep takes away from the power management mini-game for speed builds. My recent runs were very reliant on those processors and part of the fun came from figuring out which subset of them should be on in order to maximize utility while minimizing power deficit. This could be because it is truly fun. It could also be because I have the soul of an accountant :).

I also see decker's point of view having lost many games due to propulsion mishaps where I left some of my stuff off and this an annoying way to lose a game.

I am still leaning more towards leaving the processor upkeep there, at least for a while until you have sufficient input from new players.
Logged

zxc

  • Cogmind
  • *****
  • 1st place in the High Scores category during Alpha Challenge 2015 1st place in the Best Escapes category during Alpha Challenge 2015 Shared a Confirmed Combat Win Shared a Confirmed Stealth Win Kyzrati Patron Bug Hunter Participated in the Alpha Challenge 2015 Achievement leader in at least one category during Alpha Challenge 2015 Wiki Contributor Weekly Seed Participant
  • Posts: 726
    • View Profile
Re: Power optimizer
« Reply #5 on: February 07, 2016, 10:06:25 PM »

What if: when enemies are not in view and not actively chasing you (or haven't been seen for X turns), upkeep for certain items is removed so that you don't need to toggle many items in and out of fights?
Logged

Decker

  • Cyborg
  • ***
  • Shared a Confirmed Stealth Win Bug Hunter Supported Cogmind Alpha Access 2015-2017 (Prime Tier) Weekly Seed Participant Shared a Confirmed Combat Win
  • Posts: 172
    • View Profile
Re: Power optimizer
« Reply #6 on: February 07, 2016, 10:39:36 PM »

Quote
It's still more complex than you're making it out to be, even with your shortened list--there are cyclical dependencies between power sources and other parts. Or heat sinks and other parts. While it's possible to apply this feature piecemeal to some parts in order to avoid those dependencies, for example only not taking unused heat sinks into account, the inability to apply this to all parts will leave some people confused.

Could these dependencies be handled as follow? My (perhaps naive) understanding is that this algorithm is sufficient. It's greedy and not optimal, but probably good enough.
- Sort power sources and heat sinks according to power/heat or heat/energy_drain ratios.
- Loop activating parts.
  - (Restart this loop whenever a part is activated).
  - If missing power, activate next power source, if any. Do not cap overflows yet.
  - If excess heat, activate next heat sink, if any. Do not cap underflows yet.
  - Activate next non-heatsink/power part, if any.
  - Break when no part was activated.
- Cap power and heat properly. I assume you can apply this algorithm every turn (100 time?).

*Edit* if not enough power for all parts, turn off items greedily (items at the end of the list get turned off).

I fully agree that inconsistency (and complexity) is bad -- for me it's the lesser of two evils.

Quote
My preference here is to introduce meaningful reasons for keeping them activated. So as of Alpha 7 you'll get a +5% dodge bonus while hovering (if not overweight), and being overweight will also cancel the benefit of Maneuvering Thrusters.

Heh. That makes sense and I like this change. But that won't change the situation for a combat bot where you're overweight by design (it's still better to switch to treads for recoil reduction and less upkeep).

Quote
(Also, you know there's a shortcut to toggle all propulsion at once, right?)

Yes. It's useful, but not a panacea. E.g. I often activate only a subset of my 8 legs/hover/whatever because it drains extra energy for no speed gain. That is another thing that would benefit from power gating -- often you move faster by deactivating parts.

Quote
With regard to processors, another possibility I've considered is complete removal of all of their upkeeps. This would be a rather big change and have several repercussions, but without getting into those here just yet, what does everyone think?

... wow what a major change! I don't know what to think. It would solve the on-and-off issue of some parts. It'd also be more realistic. Targeting computer draining 8 power? My old 386 drains less power and can do 10x more work ;D

Note that if you don't change the upkeep for all other offensive parts (armor analyzer, particle charger, cloaking, etc.), the problem will remain -- you need to deactivate those to move and scan/map.

« Last Edit: February 07, 2016, 10:47:00 PM by Decker »
Logged

Decker

  • Cyborg
  • ***
  • Shared a Confirmed Stealth Win Bug Hunter Supported Cogmind Alpha Access 2015-2017 (Prime Tier) Weekly Seed Participant Shared a Confirmed Combat Win
  • Posts: 172
    • View Profile
Re: Power optimizer
« Reply #7 on: February 08, 2016, 06:59:34 AM »

Analyzing further, the root issue is the frequent transitions between two states (explore/combat) which have very little in common.

Explore -> combat:
- Swap scanner/sensor with heat sinks.
- Switch to treads.
- Disable terrain processor / signal interpreter.
- Disable weight reduction.
- Enable offensive payload.
- Enable defensive payload.

You have a strong incentive to carry on these optimizations because
1) resources are limited
2) with force fields, power = life
3) wasted power = heat = death

As Sherlockkat said, optimizing within a state is fun. It's the cross-state optimizations that are problematic.

All the solutions I can think of are bad (e.g. macro). It seems like that solving this problem requires radical changes akin to those that were used to remove the explore/hack transition (which I appreciate very much).

Food for thought:
1) Remove most time-based upkeeps, replace by pay-as-you-use (on attack/move/defend). Sensors are free. ECM, jammer and armor use time-based upkeep.
2) Sensors / terrain scanner are considered processors to prevent the swap cheese.
3) The tread bonus applies unconditionally (a well-known side effect of weightless treads).

I hope that somebody figures out something better than that.
Logged

Kyzrati

  • Administrator
  • True Cogmind
  • *****
  • Posts: 4477
    • View Profile
    • Cogmind
Re: Power optimizer
« Reply #8 on: February 08, 2016, 07:41:59 AM »

I don't know. Removing their upkeep takes away from the power management mini-game for speed builds. My recent runs were very reliant on those processors and part of the fun came from figuring out which subset of them should be on in order to maximize utility while minimizing power deficit. This could be because it is truly fun. It could also be because I have the soul of an accountant :).
This is a good point, a comment which I've heard from several people now, actually. For some it's fun, and Decker's camp it's tedious and possibly error prone.

I'm more on the side that says this is a part of the game, proper management of your parts.

I also see decker's point of view having lost many games due to propulsion mishaps where I left some of my stuff off and this an annoying way to lose a game.
I've tried to make this as obvious as possible with the big glowing indicator in the corner, but it's still sometimes possible to miss. I think a better alternative solution here would be to require confirmation before your first move that will be slower than something like 300 (in which case you're probably accidentally overweight).

What if: when enemies are not in view and not actively chasing you (or haven't been seen for X turns), upkeep for certain items is removed so that you don't need to toggle many items in and out of fights?
This would result in some complications when enemies can see you but you can't see them, meaning a sudden change in your upkeep would give away information.

@Decker: The loop could work under a simpler system, but there are still caveats and exceptions here depending on what parts you have, including utilities. Some of them act like power sources, generating energy from matter or even heat (or even something else no one's encountered before because it's not available yet).

Probably a bigger problem that makes this complex and unintuitive is the fact that upkeep is accounted for once per turn, while movement and other actions can take anywhere from a small fraction of a turn to multiple turns.

Another complication I just came up with based on external factors: Say the system says you don't need to have all those heat sinks active because you're not generating quite enough heat to matter (whatever threshold that should be, 300?), then you're suddenly shot by a squad of Grunts and your heat spikes due to the thermal transfer and disables some of your parts. Heat dissipation is also more complex by itself because it now occurs over multiple turns.

For me, this sounds like it would make play more difficult because it reduces the transparency of the whole energy/heat/active part balance. You'll have a harder time gauging your limits with a given loadout. Overall, I think this might be doable, but probably still isn't worth the investment since it's not unquestionably better in nearly every case but would take quite a while to get right (implementation-wise).

That is another thing that would benefit from power gating -- often you move faster by deactivating parts.
Since the changes in Alpha 5, this is only true if you are simultaneously equipped with multiple forms of propulsion, in which case added management is a natural side effect. (Unless you're referring to flight/hover situations where you need to deactivate non-propulsion parts in order to active and power more propulsion, but again this is the management game.)

Quote
My preference here is to introduce meaningful reasons for keeping them activated. So as of Alpha 7 you'll get a +5% dodge bonus while hovering (if not overweight), and being overweight will also cancel the benefit of Maneuvering Thrusters.
Heh. That makes sense and I like this change. But that won't change the situation for a combat bot where you're overweight by design (it's still better to switch to treads for recoil reduction and less upkeep).
That doesn't seem relevant to this particular discussion, since it's a strategic decision you have to make manually.

... wow what a major change! I don't know what to think. It would solve the on-and-off issue of some parts. It'd also be more realistic. Targeting computer draining 8 power? My old 386 drains less power and can do 10x more work
Absolutely, that's why I've thought of making that change many times--it was introduced purely for balance purposes, and it does a good job of that. It'd be a pretty drastic change...

Note that if you don't change the upkeep for all other offensive parts (armor analyzer, particle charger, cloaking, etc.), the problem will remain -- you need to deactivate those to move and scan/map.
I'm just looking for ways to potentially mitigate the issue where possible so that it's less annoying for those who care, since it's highly unlikely there would be a perfect solution that works across the board.

-- and I finally finish typing all that and you have another post --

As Sherlockkat said, optimizing within a state is fun. It's the cross-state optimizations that are problematic.
I can see this as the case, and you are pretty much the only player I know who tries to optimally play an extreme hybrid good at everything. So it's easier to reach those limits.

1) Remove most time-based upkeeps, replace by pay-as-you-use (on attack/move/defend). Sensors are free. ECM, jammer and armor use time-based upkeep.
Multiple meanings of upkeep are best avoided.

2) Sensors / terrain scanner are considered processors to prevent the swap cheese.
But they're logically devices, and not processors, so I'd like to keep them that way. I really don't mind the swapping since there really aren't that many things that truly need to be swapped.

3) The tread bonus applies unconditionally (a well-known side effect of weightless treads).
If you mean the recoil benefit, that would be unfair because then you could carry a single one as a flier just for the bonus, and get dodge bonuses as well. I'm already annoyed that you get the benefit of coverage and integrity from those extra unrelated propulsion parts, and I've been of a mind to zero or vastly reduce the coverage of inactive propulsion to avoid that cheese. You've narrowly escaped that so far.

Analyzing further, the root issue is the frequent transitions between two states (explore/combat) which have very little in common.
This is certainly the crux of the issue, but the mechanics of the game aren't compatible with the usual solutions for something like this you might find in a game. Setting a swappable "kit" would be one of the more common approaches, but your build can change so quickly it wouldn't be worth setting up.
Logged
Josh Ge, Developer - Dev Blog | @GridSageGames | Patreon

Decker

  • Cyborg
  • ***
  • Shared a Confirmed Stealth Win Bug Hunter Supported Cogmind Alpha Access 2015-2017 (Prime Tier) Weekly Seed Participant Shared a Confirmed Combat Win
  • Posts: 172
    • View Profile
Re: Power optimizer
« Reply #9 on: February 08, 2016, 08:20:40 AM »

Quote
I think a better alternative solution here would be to require confirmation before your first move that will be slower than something like 300 (in which case you're probably accidentally overweight).

That would be great.

Quote
I'm just looking for ways to potentially mitigate the issue where possible so that it's less annoying for those who care, since it's highly unlikely there would be a perfect solution that works across the board.

If you're unwilling to change the core mechanics (and I can understand why you would not want to), then yeah, something like that is probably the best you can do.

I still think that the easiest option to implement, and the one that would make the most sense, is to make all offensive utilities only take power when weapons are fired. It's not even a new mechanic -- weapons (i.e. offense parts) already drain only on usage.

Quote
Since the changes in Alpha 5, this is only true if you are simultaneously equipped with multiple forms of propulsion, in which case added management is a natural side effect.

I'm fairly sure that equipping more of a kind sometimes slows you down, when there are parts with different speed factors. I'll post a screen shot when I reproduce that bug, if you want.

Quote
This is certainly the crux of the issue, but the mechanics of the game aren't compatible with the usual solutions for something like this you might find in a game. Setting a swappable "kit" would be one of the more common approaches, but your build can change so quickly it wouldn't be worth setting up.

Yes. Given the situation, perhaps a macro would be good after all. With some options to control its behavior (you can always undo unwanted changes since it's instant). Something like Macro 1 (option screen):
- Propulsion activation order [when available]:
  - Tread.
  - Leg.
  - Wheel.
  - Hover.
  - Flight.
- Signal interpreter [on/off].
- Offensive payload [on/off].
- Defensive payload [on/off].

The presentation needs help, but you get the idea. Could be implemented post 1.0, since it's low priority.

Quote
I've been of a mind to zero or vastly reduce the coverage of inactive propulsion to avoid that cheese. You've narrowly escaped that so far.

Help! I'm being threatened! :-X
However, that change would actually work in my favor :P
Logged

Kyzrati

  • Administrator
  • True Cogmind
  • *****
  • Posts: 4477
    • View Profile
    • Cogmind
Re: Power optimizer
« Reply #10 on: February 09, 2016, 03:42:40 AM »

Quote
I think a better alternative solution here would be to require confirmation before your first move that will be slower than something like 300 (in which case you're probably accidentally overweight).
That would be great.
It shall be done. (I know I've gotten hit by this problem once every game or two as well, often towards the end of, or after, a battle.)

I still think that the easiest option to implement, and the one that would make the most sense, is to make all offensive utilities only take power when weapons are fired. It's not even a new mechanic -- weapons (i.e. offense parts) already drain only on usage.
This could work, though it will require a new item stat aside from "upkeep," and the amounts would have to be rolled into your displayed volley costs. This I'll consider.

It will save a bit of wasted energy, and will also mean that part usage costs less overall unless values are increased, since upkeep is drawn every turn, while under this system a multi-turn volley would ideally/probably only apply them once.

Quote
Since the changes in Alpha 5, this is only true if you are simultaneously equipped with multiple forms of propulsion, in which case added management is a natural side effect.
I'm fairly sure that equipping more of a kind sometimes slows you down, when there are parts with different speed factors. I'll post a screen shot when I reproduce that bug, if you want.
Ah, not a bug. I was thinking about earlier versions where this was happening a lot due to the way propulsion stacking works, but that was solved under the new system. However, it is currently possible to become slower with multiple propulsion when you're mixing certain variants. For example, things like Titanium Legs will actually slow you down (compared to more common types) because they carry much more armor, so you have to take into account their other qualities as well.

Quote
I've been of a mind to zero or vastly reduce the coverage of inactive propulsion to avoid that cheese. You've narrowly escaped that so far.
Help! I'm being threatened! :-X
However, that change would actually work in my favor :P
Ha, just fooling around. I decided making that change would have as many benefits as drawbacks and wouldn't be worth it.
Logged
Josh Ge, Developer - Dev Blog | @GridSageGames | Patreon

Decker

  • Cyborg
  • ***
  • Shared a Confirmed Stealth Win Bug Hunter Supported Cogmind Alpha Access 2015-2017 (Prime Tier) Weekly Seed Participant Shared a Confirmed Combat Win
  • Posts: 172
    • View Profile
Re: Power optimizer
« Reply #11 on: February 09, 2016, 07:53:20 AM »

Quote
This could work, though it will require a new item stat aside from "upkeep," and the amounts would have to be rolled into your displayed volley costs. This I'll consider.

It will save a bit of wasted energy, and will also mean that part usage costs less overall unless values are increased, since upkeep is drawn every turn, while under this system a multi-turn volley would ideally/probably only apply them once.

You're right, and it could upset the balance since it's already hard sometimes to pay the upfront power cost required to fire a volley. Though that usually happens because these utilities drain too much energy in the first place. That could lead to an interesting optimization problem in favor of using heavier reactors to keep a higher upfront power bank. Another option is to keep the current "upkeep-like" system but only drain energy every turn when firing and drain the remainder power when you're ready to act. That's not very elegant though.

Logged