diff options
| author | pepperpepperpepper <pepper@scannerjammer.com> | 2015-12-07 15:10:14 -0800 |
|---|---|---|
| committer | pepperpepperpepper <pepper@scannerjammer.com> | 2015-12-07 15:10:14 -0800 |
| commit | e679707290eff0fc30bee0a45b7d409a87c97e8a (patch) | |
| tree | 21d23e6f2ac89c48a58dde94b4e4a64e3024a1d1 | |
| parent | e1a642e41e7e6d08303573fb20f265b4ac326372 (diff) | |
debugged any issues with probabilities
| -rwxr-xr-x | example.py | 2 | ||||
| -rw-r--r-- | ricky/param/__init__.py | 2 | ||||
| -rw-r--r-- | share/probabilities/PbBreaker.json | 8 |
3 files changed, 6 insertions, 6 deletions
@@ -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} ] } |
