Skip to content

Commit

Permalink
quick debugg on convictio3
Browse files Browse the repository at this point in the history
  • Loading branch information
Zargham committed Oct 19, 2019
1 parent 800c102 commit 54763ac
Show file tree
Hide file tree
Showing 6 changed files with 363 additions and 333 deletions.
Binary file modified __pycache__/bonding_curve_eq.cpython-36.pyc
Binary file not shown.
Binary file modified __pycache__/conviction_helpers.cpython-36.pyc
Binary file not shown.
Binary file modified __pycache__/conviction_system_logic3.cpython-36.pyc
Binary file not shown.
684 changes: 357 additions & 327 deletions conviction_cadCAD3.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion conviction_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def initialize_network(n,m, funds_func=total_funds_given_total_supply, trigger_f
network.nodes[j]['age']=0

r_rv = gamma.rvs(3,loc=0.001, scale=10000)
network.node[j]['funds_requested'] = r_rv
network.nodes[j]['funds_requested'] = r_rv

network.nodes[j]['trigger']= trigger_threshold(r_rv, initial_funds, initial_supply)

Expand Down
10 changes: 5 additions & 5 deletions conviction_system_logic3.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def gen_new_proposal(network, funds, supply, trigger_func, scale_factor = 1.0/10

rescale = funds*scale_factor
r_rv = gamma.rvs(3,loc=0.001, scale=rescale)
network.node[j]['funds_requested'] = r_rv
network.nodes[j]['funds_requested'] = r_rv

network.nodes[j]['trigger']= trigger_func(r_rv, funds, supply)

Expand Down Expand Up @@ -252,8 +252,8 @@ def complete_proposal(params, step, sL, s, _input):

for i in participants:
force = network.edges[(i,j)]['affinity']
sentiment = network.node[i]['sentiment']
network.node[i]['sentiment'] = get_sentimental(sentiment, force, decay=0)
sentiment = network.nodes[i]['sentiment']
network.nodes[i]['sentiment'] = get_sentimental(sentiment, force, decay=0)



Expand All @@ -262,8 +262,8 @@ def complete_proposal(params, step, sL, s, _input):
network.nodes[j]['status']='failed'
for i in participants:
force = -network.edges[(i,j)]['affinity']
sentiment = network.node[i]['sentiment']
network.node[i]['sentiment'] = get_sentimental(sentiment, force, decay=0)
sentiment = network.nodes[i]['sentiment']
network.nodes[i]['sentiment'] = get_sentimental(sentiment, force, decay=0)

key = 'network'
value = network
Expand Down

0 comments on commit 54763ac

Please sign in to comment.