-
Notifications
You must be signed in to change notification settings - Fork 20
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
Calculate weight variate and showcase score range from height/weight for use in map filter/display #215
Comments
This is great research but since it is derivative from core data it feels like it should be implemented downstream from golbat |
Thanks to @PickleRickVE who did some calculations based on the webhooks sent. Seems it's not worth to calculate it and we should close it, except we do something wrong? processMon = (pokemon) => {
let vWeight = pokemon.weight/pokemon.avgWeight;
let vHeight = pokemon.height/pokemon.avgHeight;
let wv = Math.abs(vWeight-vHeight); // relationship between weight and height (fixed for each mon, -0.5 to 0.5)
let ivSum = (pokemon.atk + pokemon.def + pokemon.sta);
let xc = mon[pokemon.id].class; // xxclass (different for each species, either 1.55, 1.75 or 2 and at the same time the max height factor)
let avgScore = 800 * vHeight/xc + 150 * vWeight/(0.5+xc) + 50 * ivSum/45 + 178; // score for scanned mon
let minScore = 800 * minVHeight/xc + 150 * vWeight/(0.5+xc) + 50 * ivSum/45 + 178; // min height factor determined by scanned values (1.5 for xxclass 2)
let maxScore = 800 + 150 * vWeight/(0.5+xc) + 50 * ivSum/45 + 178; // max possible score for the scanned mon with max height (avgHeight * xc )
...
} Result:
|
Just came across this issue. I'm agreeing with jabes, Golbat isn't the place for it. user @/sellyme on discord is an expert on height/weight stuff. |
Just chiming in here since I got pinged. First of all, I think it's worth noting that XXL-3 mons (the ones with a height variate of up to 2.00) are going to have substantially wider and less useful ranges than XXL-2 and especially XXL-1 mons, so the ranges would be much tighter and more useful for most other spawns than the example case of Wailmer. With bot-collected data the variability is entirely within the height variate, and XXL-3 spawns have a 10x wider range of possible height variates than XXL-1 spawns. This is a large part of why the ranges presented on Wailmer are not anywhere near as tight as the ranges presented in Gazaerdjeah's original examples. There's some odd things with the processing Fabio posted above I don't quite understand (possibly just because not everything in scope is presented in that code snippet), and I'm not 100% sure the method of predicting the weight variate portion of the score is accurate. It's difficult to verify just from reading the code without testing some data myself though (particularly since it's using slightly different framing of the weight variate to what bmenrigh and I have been doing), so I could be completely incorrect here. Additionally the OP of this issue was correct in their research of the "flat 178 point XL bonus" actually being a I will note that this is something I personally find an extremely useful feature (and have written substantial programs of similar functionality for my own use), and it ends up being extraordinarily effective across large enough datasets, particularly given that alt accounts let you find certain target spawnpoints with high upper bounds and reroll chances at getting a near-optimal one. Another example case I've had people use my size range calculation tools for is identifying spawns with the highest probability of having a 0.00kg weight, something that can be upwards of a 40% chance in ideal conditions! That said, this is all rather academic if that kind of functionality isn't suitable for this repo. But if anyone knows of or works on any downstream repos that this kind of processing might be appropriate for I would certainly be willing to help with implementation, it's a niche use case but the precision and scale of automated data processing makes those use cases orders of magnitude more convenient. |
@Fabio1988 the formulas need a couple tweaks to include the changes to vWeight due to the height variate Looking at the first result output for example: This should be: I can reproduce the initial scores by using vWeight≈0.68 in the initial formulas:
But I'm not entirely sure how 0.68 has been calculated here, since vWeight = pokemon.weight/pokemon.avgWeight and an XXL's weight is always above average weight, so vWeight should always be greater than 1. The second issue is that while you can technically use vWeight, you'd need to specify a minvWeight and maxvWeight since weight is not static, and changes based on the height variate: pokemon.weight = pokemon.avgWeight * (height variate + weight variate) It's easier to re-arrange this for vWeight = (height variate + weight variate) and substitute in to make the corrected formulas (which now account for min and max height variate):
This would modify the code to:
And would change the results to:
|
Thx guys for bringing light in this complicated matter. I corrected and modified my code thanks to your suggestions. The results are looking good. The range for class 1.75 mon is ~130, not much better than for class 2 (~230). Even with a great variate and perfect iv there is no guarantee for a high scoring mon. The xxl status itself is imho more important than a range which is 10-20 points higher. A bad height value can easily mess up the score. Don't think that there's any criteria that's worth filtering. The class 1.55 mon are a lot better but for them there's nearly no need to calculate the range. They're great no matter what. But giving the calculated range to users is nice to have and could be implemented on top of the xxl notification on a map or messenger bot.
|
isnt height and weight different to each account ? |
For each individual account that captures a specific spawn, height rerolls completely randomly within the size class (so XL mons will stay XL, but the height can be any valid XL height). Weight is more complex - a Pokemon's weight is determined by both a "weight variate" and its height. This weight variate does not change between accounts, so a very heavy Pokemon relative to its height on one account will also be a very heavy Pokemon relative to its height on any other account. What that actual weight and height is will change, but the relation between them won't. Because of this (and also the similarly-unchanging IVs being a part of contest scoring), you can identify Pokemon spawns that have good results in the factors that you know don't change, so that you know if you roll lucky on the height it's going to be a near-perfect specimen. You effectively only have to get lucky on one roll (height), whereas if you were catching randomly you'd have to get lucky on three rolls (height, weight variate, IVs). |
Made a small bot based on this calculation: https://github.com/PickleRickVE/xxlbot |
Calculate weight variate (weight/average weight - height/average height) for use in map filter and display.
Since 4/11/2023, height variate has been rerolled for each trainer within each height range (XXS to XXL). Weight is determined by multiplying average weight by the sum of height variate and weight variate, with weight variate constant for each spawn for all trainers level 30+. During evolution, height is re-rolled but weight variate is unchanged.
Weight variate has a normal distribution with mean of 0 and standard deviation of 0.125 and is constrained to the range of -0.5 to +0.5.
Having weight variate information would be helpful as it determines the potential showcase score range for a given spawn. Also for events with many XXL spawns, the ability to filter notifications and map spawns above a selected weight variate threshold would be beneficial. The weight variate range corresponds to a showcase score range of 60 to 73 points, depending on the species XX-Class (or max height, 1.55, 1.75, or 2.0, with exception of Pumpkaboo and Gorgeist). This has a greater effect on showcase score than IV sum, which has a 50 point range.
Showcase score for a given spawn with including IV:
800/xc * hv + 150/(xc + 0.5) * (hv + wv) + 50/45 * (IV sum) + if(XXL,7300/41)
with xc=XX-Class, hv=height variate, wv=weight variate
For example an XXL 1.55 XX-Class spawn with weight variate of +0.25 (97th percentile) and 80% IV (36 IV sum) would have a showcase score range of 1120.29 to 1149.76, depending on height variate rolled for each trainer. An XXL 1.55 XX-Class spawn with weight variate of -0.25 and 80% IV would have a showcase score range of 1083.71 to 1113.17.
References:
https://twitter.com/bmenrigh_pogo/status/1618456354712350720
https://twitter.com/bmenrigh_pogo/status/1680851346768150528
https://twitter.com/bmenrigh_pogo/status/1718927008736927980
https://www.reddit.com/r/TheSilphRoad/comments/12jy9xe/weight_and_height_for_pokemon_caught_in_the_wild/
https://www.reddit.com/r/TheSilphRoad/comments/1aqd5lh/how_the_great_buddy_showcases_work/
https://docs.google.com/spreadsheets/d/1ZZwlZ2DOYeO0ouUgu-jXn3qmIf8jE4WTa3BhmtVupHc/
The text was updated successfully, but these errors were encountered: