@@ -216,7 +216,7 @@ space = GridSpaceSingle(size; periodic = false, metric = :chebyshev)
216
216
# ## Step 2: creating the agent type
217
217
218
218
# With this knowledge, let's now make the agent type for the Schelling segregation model.
219
- # According to the rules of the game, the agent needs to have two auxilary properties:
219
+ # According to the rules of the game, the agent needs to have two auxiliary properties:
220
220
# its mood (boolean) and the group it belongs to (integer). The agent also needs to
221
221
# inherit from `GridAgent{2}` as in the example above. So, we define:
222
222
@@ -225,7 +225,7 @@ space = GridSpaceSingle(size; periodic = false, metric = :chebyshev)
225
225
group:: Int # The group of the agent, determines mood as it interacts with neighbors
226
226
end
227
227
228
- # Let's explitily print the fields of the data structure `SchellingAgent` that we created:
228
+ # Let's explicitly print the fields of the data structure `SchellingAgent` that we created:
229
229
230
230
for (name, type) in zip (fieldnames (SchellingAgent), fieldtypes (SchellingAgent))
231
231
println (name, " ::" , type)
@@ -475,7 +475,7 @@ added_agent_1 = add_agent!((1, 1), schelling, false, 1)
475
475
476
476
added_agent_2 = add_agent! (schelling, false , 1 )
477
477
478
- # Notice also that agent fields may be specified by keyowrds as well,
478
+ # Notice also that agent fields may be specified by keywords as well,
479
479
# which is arguably the more readable syntax:
480
480
481
481
added_agent_3 = add_agent! (schelling; mood = true , group = 2 )
@@ -732,7 +732,7 @@ model = StandardABM(
732
732
)
733
733
734
734
735
- # When adding agents to the moedel example, we can explicitly make agents
735
+ # When adding agents to the model example, we can explicitly make agents
736
736
# with their constructors and add them. However, it is recommended
737
737
# to use the automated [`add_agent!`](@ref) function and provide as a first argument
738
738
# the type of agent to add. For example
@@ -757,7 +757,7 @@ model
757
757
MultiSchelling
758
758
759
759
# This `MultiSchelling` is not a union type; it is an advanced construct
760
- # that wraps multipe types. When making a multi-agent directly (although it is not recommended,
760
+ # that wraps multiple types. When making a multi-agent directly (although it is not recommended,
761
761
# use `add_agent!` instead), we can wrap the agent type in the multiagent type like so
762
762
763
763
p = MultiSchelling (Politician (; id = 1 , pos = random_position (model), preferred_demographic = 1 ))
0 commit comments