# Agents.jl: Establishing a new space type

**URL:** <https://discourse.julialang.org/t/agents-jl-establishing-a-new-space-type/93915>\
**Category:** Modelling & Simulations\
**Tags:** agents\
**Created:** [February 2, 2023, 11:15am UTC](https://discourse.julialang.org/t/agents-jl-establishing-a-new-space-type/93915 "2023-02-02T11:15:01Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![Atiyah](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/atiyah/32/46462_2.png) [@Atiyah](https://discourse.julialang.org/u/Atiyah)\
**Post date:** [February 2, 2023, 1:31pm UTC](https://discourse.julialang.org/t/agents-jl-establishing-a-new-space-type/93915/7 "2023-02-02T13:31:15Z")

</div>

> [@Datseris](#):
>
> AH LOL, classic beginner Julia mistake 😃 we’ve all been here

Not really a beginner. I have been practising Julia for a while and gone over couple of decent books. We actually discussed this coding style once ([passing types rather than using type parameters](https://discourse.julialang.org/t/the-reasons-why-abm-is-not-a-parameterized-type-in-agents-jl/80538/5)).

Then, I might be confused by [the documentation](https://juliadynamics.github.io/Agents.jl/stable/examples/schelling/#Creating-an-ABM-1), e.g.

```julia
space = GridSpaceSingle((10, 10); periodic = false)
... 
@agent SchellingAgent GridAgent{2} begin
    mood::Bool # whether the agent is happy in its position. (true = happy)
    group::Int # The group of the agent, determines mood as it interacts with neighbors
end 
...
schelling = ABM(SchellingAgent, space; properties)

```

The first argument (SchellingAgent) is a type.  
The argument space looks like instance of a SpaceType.

---

_[View the full topic](https://discourse.julialang.org/t/agents-jl-establishing-a-new-space-type/93915)._
