diff --git a/caliGraph.py b/caliGraph.py index a39db06..e35c0a5 100755 --- a/caliGraph.py +++ b/caliGraph.py @@ -395,13 +395,15 @@ def removeUselessTags(G, minUnread=1): G.remove_node(n) -def curiosityReward(G, coeff=1, dTan=True): +def curiosityReward(G, coeff=1, dTan=False): for n in list(G.nodes): node = G.nodes[n] if 'score' in node and 'se' in node: delta = node['se'] * coeff if dTan: - delta *= (1- math.tanh((node['score']/10-0.5)*7)**2) + delta *= (1 - math.tanh((node['score']/10-0.5)*7)**2) + else: + delta *= (1 - math.tanh(node['score']/5)) new = max(0.0, min(10.0, node['score'] + delta)) node['score'] = new