From e679707290eff0fc30bee0a45b7d409a87c97e8a Mon Sep 17 00:00:00 2001 From: pepperpepperpepper Date: Mon, 7 Dec 2015 15:10:14 -0800 Subject: debugged any issues with probabilities --- example.py | 2 +- ricky/param/__init__.py | 2 +- share/probabilities/PbBreaker.json | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/example.py b/example.py index 5c087b0..7c2267b 100755 --- a/example.py +++ b/example.py @@ -8,7 +8,7 @@ from ricky.pbpattern import PbPattern api = PbBreaker() params = api.params_init() print params -params.randomize() +params.randomize(probabilities_local=True) print params #print params['color1'] #params['color1'].from_normalized(0.28187431585) diff --git a/ricky/param/__init__.py b/ricky/param/__init__.py index 4ec8204..abb5e6a 100644 --- a/ricky/param/__init__.py +++ b/ricky/param/__init__.py @@ -66,7 +66,7 @@ class Param(object): if position >= choice: self.value = elem["value"] return True - return True + return False def randomize(self, probabilities=None): pass diff --git a/share/probabilities/PbBreaker.json b/share/probabilities/PbBreaker.json index 9c28e6d..6d8072d 100644 --- a/share/probabilities/PbBreaker.json +++ b/share/probabilities/PbBreaker.json @@ -1,6 +1,6 @@ { "breaktype" :[ - {"value": "CLASSIC", "weight": 1}, + {"value": "CLASSIC", "weight": 25}, {"value": "REDUX", "weight": 1}, {"value": "BLURRY_BREAK", "weight": 1}, {"value": "BLURRY_BREAK_2", "weight": 1}, @@ -23,13 +23,13 @@ {"value": "gif", "weight": 2} ], "breakangle" :[ - {"value": 0, "weight": 9}, + {"value": 0, "weight": 90}, {"value": 90, "weight": 2}, {"value": -180, "weight": 2}, {"value": 180, "weight": 2} ], "expanded" :[ - {"value": "", "weight": 11}, - {"value": 1, "weight": 2} + {"value": "false", "weight": 50}, + {"value": "true", "weight": 50} ] } -- cgit v1.2.3-70-g09d2