Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Yield Position change to Inclusive/Exclusive Range #280

Closed
Jereaux opened this issue Jan 5, 2024 · 3 comments
Closed

Comments

@Jereaux
Copy link

Jereaux commented Jan 5, 2024

With the change to input a range for Locate Climate Extreme, it does not appear that the "Yield position of" field does anything at the moment. I tested a few times with using Min/Max for the same searches, and I got back the same results with either selected.

I was wondering if it would be possible to change that drop down to more of an inclusive/exclusive range field so that one could search either within the range, or outside of the range input. It could be used for excluding certain biomes with a single condition instead of needing an OR logic gate with an upper and a lower range condition assigned, or for something like Weirdness which seems to have a similar impact on terrain at upper and lower bounds it could be used to search both of those conditions at the same time.

Just to be clear, if the drop down is set to an Inclusive/Inside Range, then a search with values -10000 to 10000 which search for values between those two. So -10500 or 10500 would fail, and 500 would pass.
If you selected an Exclusive/Outside Range in the drop down a with values -10000 to 10000, the condition would pass if the value of weirdness was outside the range, so -10500 or 10500 would pass, but 500 would fail.

@Cubitect
Copy link
Owner

Cubitect commented Jan 5, 2024

The locate climate extreme filter uses a gradient descent to find the position and value of either the minimum or maximum climate value of the specified area. The "Yield position of" field controls if the minimum or maximum is found in this way and it should be working. My guess is that you only checked a single position rather than an area? In that case the minimum and maximum are obviously the same.

The rest of your proposal sounds like the NOT logic gate with a Locate Climate Extreme condition with both an upper and lower bound. Granted, the specific use case where the area is just a single position may often coincide with the intent of excluding a value range, rather than requiring one. So I'll consider whether to include this as a build-in feature for the filter.

@Jereaux
Copy link
Author

Jereaux commented Jan 5, 2024

You are spot on that I was only testing at a single point. So if I get this correct, if using the same search within an area (my test was -Inf min to -10000 max Weirdness), using a Yield position of" = Minimum it's going to look for any value that exists on the min range so a single point will pass the check. If I set it to Maximum, then it would pass only if if the Maximum value present (in my case -10000 weirdness) is never broached, so in effect it makes it so the entire range searched must be under the maximum value set?

Sorry for the confusion on my part that came from pretty light testing overall. I didn't really understand how it worked so the fact that it did nothing under a single point was a bit baffling to me.

As for the exclusion using NOT logic gate, I do like that approach for certain search types where I just want to find a single point outside the range, so it should work well for setting up a search for either of two extremes for one parameter type. For a more broad way to exclude I could see some value in a separate setting on the Locate Biome Extreme condition type, but I do think with your explanation it could be lower priority than many other new potential features in my mind at least.

Thanks for all the feedback. As always, cubiomes viewer is amazing and I'm so glad you're continuing to work on it.

@Cubitect
Copy link
Owner

Cubitect commented Jan 5, 2024

Yes that is pretty much correct.
The min/max position is found independent of the bounds and the value at the found location is then compared to the specified value range to evaluate whether the condition is successfully satisfied.

If you leave both bound blank (-Inf, +Inf), for instance, the condition always succeeds, but it still finds the corresponding min/max location, so it can be examined by dependent conditions.

@Jereaux Jereaux closed this as completed Feb 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants