File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
mesa/examples/basic/schelling Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ def __init__(
13
13
width : int = 40 ,
14
14
density : float = 0.8 ,
15
15
minority_pc : float = 0.5 ,
16
- homophily : int = 3 ,
16
+ homophily_ratio : float = 0. 3 ,
17
17
radius : int = 1 ,
18
18
seed = None ,
19
19
):
@@ -24,7 +24,7 @@ def __init__(
24
24
height: Height of the grid
25
25
density: Initial chance for a cell to be populated (0-1)
26
26
minority_pc: Chance for an agent to be in minority class (0-1)
27
- homophily: Minimum number of similar neighbors needed for happiness
27
+ homophily_ratio: Ratio of similar neighbors to total neighbors needed for happiness
28
28
radius: Search radius for checking neighbor similarity
29
29
seed: Seed for reproducibility
30
30
"""
@@ -35,7 +35,7 @@ def __init__(
35
35
self .width = width
36
36
self .density = density
37
37
self .minority_pc = minority_pc
38
- self .homophily = homophily
38
+ self .homophily_ratio = homophily_ratio
39
39
self .radius = radius
40
40
41
41
# Initialize grid
You can’t perform that action at this time.
0 commit comments