Metrics in scripts

Started by spvincent

spvincent Lv 1

According to the blog, metrics are supposed to be disabled by default when running scripts. Yet this is not what I'm seeing: when running normal scripts (e.g. Local Mutate) on 1916b Metrics are clearly running (dimmed score/the Calculating..message in the filter drop down menu/the soloist score updating).


bkoep Staff Lv 1

Metrics are not disabled when running scripts. When we say that "recipes will ignore the Metrics by default," we simply mean that Lua functions like current.GetScore will not wait for Metrics calculations, and the return value will not include any Metrics bonuses. Metrics will still continue to run in the background.

Normally, we don't expect the background calculations to impact script performance. But, in the future we may add Lua functions for disabling Metrics, in case you do want to prevent them from running.

spvincent Lv 1

Thanks for the clarification bkoep but I think it desirable to be able to explicitly disable metrics in scripts.

What sometimes happens when running scripts, and also in the normal course of play, is seeing the best score as shown in the Solo Competition window jump, but this score may be higher than that currently held in the Very Best Soloist pose. Speculating a bit, I'm guessing that when Metrics calculation finishes and happens to record a significant gain, then this gain is added to the score of the pose that was current when Metrics calculation was initiated and the best score updated appropriately. However the pose from which this score was derived has now been lost. (hope this makes sense).

This problem would not arise if you could explicitly disable metrics.

Bletchley Park Lv 1

It would make far more sense to have a checkbox / lua command to diable metrics if so desired and have the metrics calculation, if enabled, be part of the entire chain of score calculation, recent best, absolute best and credit best solutions. This way you can go back to max score with metrics which now is a matter of luck. It also makes sense from a 'better solution' point of view as the better metrics are what onbe is looking for in these metrics enabled puzzles. Wiggle may even take it into account when trying different direction to wiggle to in each iteration.

Essentially one creates this situation by explicitly coding the 'wait for metrics to finish' LUA commands in all scripts, which is a pain.