Questions tagged [agent-based-modeling]

Agent-based modeling is a computer simulation method where agents make decisions based on their interactions with each other and their environment. It combines elements of game theory, complex systems, emergence, computational sociology, multi-agent systems, and evolutionary programming.

From Wikipedia:

An agent-based model (ABM) (also sometimes related to the term multi-agent system or multi-agent simulation) is a class of computational models for simulating the actions and interactions of autonomous agents (both individual or collective entities such as organizations or groups) with a view to assessing their effects on the system as a whole. It combines elements of game theory, complex systems, emergence, computational sociology, multi-agent systems, and evolutionary programming. Monte Carlo Methods are used to introduce randomness. ABMs are also called individual-based models.

474 questions
0
votes
2 answers

How to divide turtles into different size-groups according to a turtle-own variable?

I'm trying to set up firms (turtles) in an industry (world) by assigning them different sizes according to their income (firms-own). The distinction between small, medium and large size should be dependent on the percentage of income in relation to…
0
votes
1 answer

Plotting downward-shaping curves related to a variable / list

this is related to my previous question I have created a list for each turtle with three elements (opinion1 opinion2 opinion3). Each of these elements is in the [-1 ; +1] range (three random values for each turtles). What I'd like now is to have a…
lomper
  • 379
  • 1
  • 12
0
votes
1 answer

How to divide turtles in groups by percent?

In my world, turtles are firms. 30 % of all firms have a low output (Y = 1), 60 % a medium (Y = 2) and 10 % a high production output (Y = 3). How can I assign an input for Y to 30 % of my turtles/firms? Best would be to have a slider in order to…
user11277648
  • 53
  • 1
  • 5
0
votes
1 answer

How to find the average distance from turtles that fulfill a certain condition?

I want to move the current turtle one step closer to the others that fulfill a certain condition (e.g. have color = green). I am doing this the hard way (because I don't know any better), by trying to calculate the the average distance of the…
OC2PS
  • 1,037
  • 3
  • 19
  • 34
0
votes
1 answer

Get a count of turtles with a combination of values

I am trying to count the number of "buyer" type turtles, which have a certain surplus (turtle variable) greater than or equal to zero, and price (another turtle variable) greater than the current turtle's price (already grabbed in local variable…
OC2PS
  • 1,037
  • 3
  • 19
  • 34
0
votes
1 answer

How to find the closest turtle(s)?

NetLogo command distance can be used to find the distance of a turtle from another turtle. However, I am looking for each turtle to be able to find the turtle(s) with the smallest sum of [distance from it + price(a turtle variable)]. How can…
OC2PS
  • 1,037
  • 3
  • 19
  • 34
0
votes
1 answer

Netlogo: [CODE] Asking patches directly behind you to change colour

I am trying to create a game and what I want to do is make the patch behind the turtle to change its color as soon as the turtle eats a fruit. So the turtle moves and eats fruits. Upon eating one fruit, the patch behind the one it is on will change…
Alea
  • 121
  • 3
0
votes
1 answer

Netlogo: Stop loop of actions after turtles carry out action

Continuation of a model I described before, it's for my dissertation and based on the trust game literature. Relatively new to Netlogo, and I am sure I am missing something essential here. My world has two breeds of agents, sex workers and officers.…
0
votes
1 answer

Looping through, and updating, array values until a condition is met, or until 100 loops have been completed?

Working in Python 3.7 on a Jupyter Notebook. I'm working on a project that will loop through a 2D Numpy Array ("board", if you will) check for all instances of the number 1. When it finds the number 1, I need it to check the values to the left,…
0
votes
1 answer

Changing the color of agents in NetLogo according to a turtle-own variable

I am writing a simple food exchange model in netlogo and I want the agents to change their color as their [food] level changes in the model. The amount of food is in range [0,1] and I want the color to change from white to red (white = food level of…
Gol
  • 27
  • 1
  • 5
0
votes
0 answers

How do I count the number of unique interactions between turtles in my model?

I am writing a NetLogo model to describe the food exchange interactions between pairs of bees until the food is distributed evenly among all. I have two breeds of "fulls" and "hungries" in my model. Right now I am counting the number of interactions…
Gol
  • 27
  • 1
  • 5
0
votes
0 answers

NetLogo file-read issue

I have an issue with load-data command. I manage to setup my model, shows up quite nicely. Then I need to load the data before I press "go". It does not work though and I have no idea why. So I already defined my turtles as part of the setup and by…
0
votes
0 answers

Count interaction between two agent breeds to change property type of one (netlogo)

My model has two breeds of agents, police officers and sex workers, and intends to model the effects of different policies on trust creation (vs. fear) between police and sex workers. It includes a variety of other aspects, but I based it on a mix…
0
votes
1 answer

Netlogo Coding - IF codes

here is the issue that I am facing in Netlogo. I want a turtle to check one of its own variable and another variable of the other turtle (different breed). based on these 2 two values I want to set a reward for the turtle. Let's say that I have…
0
votes
1 answer

How do I create a randomly distributed boolean variable for a that will change in the model?

I am writing a model with two breeds: sexworkers and officers where sexworkers possess a boolean variable that is randomly distributed at the setup, but then changes at the go according to the behavior of and interaction with officers. I use…
Mira Fey
  • 49
  • 5