Coder Social home page Coder Social logo

Comments (4)

MaxOhn avatar MaxOhn commented on September 28, 2024 1

I don't really understand what any of your output means, checked some of your map ids and I got very accurate values.

What are you comparing rosu-pp's values with?

from rosu-pp-py.

EnricoBaivo avatar EnricoBaivo commented on September 28, 2024

Sorry, for the bad description.

I will get into detail now, i would also bet on it that i do something wrong.

Im comparing with achieved BEST USER SCORES so i am aware that the pp are slightly under the expected "full pp".

I tryed to reconstruct the score pp value with respektet weighting. So i checked for big pp diffrences from the calculations.

def main():
    # fresh fetch from OSU API For User
    with open(file="score_calculated_pps.json", mode="r", encoding="utf-8") as f:
        scores = json.load(f)
    # calculate_pp(scores)
    for score in scores:
        test_calculate_pp(score)


def test_calculate_pp(score):
    beatmaps = Path(os.getcwd()+"/../OsuHub-DATA/%s" %
                    str(score.get("beatmapset").get("id"))).glob("*.osu")
    print("Beatmapset ID: %s" % (score.get("beatmapset").get("id")))
    for osu_file_path in beatmaps:
        # find beatmap via checksum
        md5 = generate_md5(osu_file_path)
        bmap = Beatmap(path=osu_file_path.as_posix())
        calculator = Calculator(n300=score.get("statistics").get("count_300"),
                                n100=score.get("statistics").get("count_100"),
                                n50=score.get("statistics").get("count_50"),
                                n_misses=score.get(
                                    "statistics").get("count_miss"),
                                n_geki=score.get("statistics").get(
                                    "count_geki"),
                                n_katu=score.get("statistics").get(
                                    "count_katu"),
                                mods=models.mods.Mods(score.get("mods")).bitwise)
        res = calculator.performance(bmap)
        score_pp = score.get("pp")
        if md5 == score.get("beatmap").get("checksum"):
            diffrence = round(res.pp-score_pp , 2)
            if check_if_pp_is_in_range(reached_pp=score_pp, nearest_expected_pp=res.pp):
                # if is in range between 0.8 and 1.1 of the pp
                if diffrence == 0.0:
                    print("MATCHING | Rosu PP: %s  Score PP: %s diffrence %s" %
                          (res.pp, score_pp, diffrence))
                
            else:
                print("NOT MATCHING | Rosu PP: %s  Score PP: %s diffrence %s" %
                      (res.pp, score_pp, diffrence))

RESULT:
Beatmapset ID: 399061
MATCHING | Rosu PP: 69.63567769262768 Score PP: 69.6353 diffrence 0.0
Beatmapset ID: 770306
NOT MATCHING | Rosu PP: 94.30856476996237 Score PP: 69.4847 diffrence 24.82
Beatmapset ID: 358451
Beatmapset ID: 1280506
MATCHING | Rosu PP: 68.30147624582666 Score PP: 68.3012 diffrence 0.0
Beatmapset ID: 1525595
....

I first encountered this problem when I calculated each beatmap for a lot of mods and accuracies. Some results were accurate, and some were not. I have to mention that I use a for loop with a multiprocessing approach for calculating each beatmap in a beatmapset concurrently. Each process gets its own Calculator().

bmap = Beatmap(path=osu_file_path)
calc = Calculator()
for mod_flag in mod_combinations:
        calc.set_mods(mod_flag)
        SS = calc.performance(bmap)
        calc.set_difficulty(SS.difficulty)
        for acc in all_percents:
                 calc.set_acc(acc_percent)
                 performance_attributes = calc.performance(bmap)

Result:
WOW_PP.csv
MATCHING BEATMAP: checksum "24eac3ecc5a97d3bcbcf32ecf84b14bf"
https://osu.ppy.sh/scores/osu/4300840266
ROSU_PP ac:97 1128.927550598182pp
Mrekk ac:97,89% 521pp

I would be happy if you could point me out the problem or if it is indeed a bug with rosu-pp-python. Thanks for youre time before hand..

from rosu-pp-py.

MaxOhn avatar MaxOhn commented on September 28, 2024
calculator = Calculator(n300=score.get("statistics").get("count_300"),
                        n100=score.get("statistics").get("count_100"),
                        n50=score.get("statistics").get("count_50"),
                        n_misses=score.get(
                            "statistics").get("count_miss"),
                        n_geki=score.get("statistics").get(
                            "count_geki"),
                        n_katu=score.get("statistics").get(
                            "count_katu"),
                        mods=models.mods.Mods(score.get("mods")).bitwise)

Looks like you forgot to specify the combo.

Other than that I can't spot anything wrong so maybe that will fix it already.

from rosu-pp-py.

EnricoBaivo avatar EnricoBaivo commented on September 28, 2024

Okay, MaxOhn it was my mistake. Thank you for your time.

from rosu-pp-py.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.