June 2019
Beginner to intermediate
770 pages
19h 24m
English
As YAML syntax contains JSON syntax, the previous examples can be loaded with YAML as well as JSON. Here's a version of the nested dictionary-of-dictionaries technique from the JSON file:
# Complete Simulation Settingstable: !!python/object:Chapter_14.simulation_model.Table dealer: !!python/object:Chapter_14.simulation_model.Hit17 {} decks: 6 limit: 50 payout: !!python/tuple [3, 2] split: !!python/object:Chapter_14.simulation_model.NoReSplitAces {}player: !!python/object:Chapter_14.simulation_model.Player betting: !!python/object:Chapter_14.simulation_model.Flat {} init_stake: 50 max_rounds: 100 play: !!python/object:Chapter_14.simulation_model.SomeStrategy {} rounds: 0 stake: 63.0samples: 100outputfile: data/ch14_simulation4c.dat ...
Read now
Unlock full access