GithubHelp home page GithubHelp logo

siena-like-model-behave-summerschool's Introduction

Network Formation Model for BEHAVE-SummerSchool (September 2023, Brescia)

Verbose Pseudo-Algo

  1. Start from an empty network with N nodes/agents (N is fixed throughout simulations)

  2. Assign breeds i.e., "networkers" and "satisficers". Use the "prop-networkers" slider to determine the proportion of "networkers" in the population

  3. Assign gender (binary variable) and seniority (integer; drawn from a Poisson distribution) to agents (currently: randomly; possible modifications: induce correlation between the two)

  4. Decide T (#of iterations) and stopping condition (max #of links the network can have)

  5. Do some graphics/plotting

  6. End setup

  7. t <- 0 (start tick counter)

  8. for {t from 0 till T or stopping condition if reached before T}:

  9. pick a random agent (i.e., a random network node)

  10. consider all possibilities the agent has to change the current out-neighborhood i.e., consider what happens if the agent sends a link one by one to other agents that are not its current out-neighbors ("potential-advisors"), and consider what happens if the agent destroys a link one by one to other agents that are instead its current out-neighbors ("current-advisors")

  11. to perform these calculations, new links must be formed and existing links must be destroyed; after this evaluation phase, the added links are removed again and the destroyed links are added again (the same outer neighborhood is maintained for the time being)

  12. quantify "happiness" with resulting networks from each potential change with an objective function

  13. the objective function is a linear combination of counts of network configurations (called "network effects") that are formed by each choice, weighted by betas (parameters in the GUI)

  14. add a shock to the objective function

  15. basically what happens in steps 9. to 14. is that the selected agent evaluates every possible 1-link modification of its own current out-neighborhood. To do this, these modified out-neighborhoods must first be formed and then evaluated. After evaluation, the marginal link is either destroyed or added again (re-store current neighborhood)

  16. calculate objective function of current out-neighborhood (of doing nothing, current "happiness")

  17. select the move maximizing objective function from possible 1-link modifications

  18. choose the index of the move that maximizes the objective function from possible 1-link modifications to find out which is the target agent of the move

  19. if utility/happiness from move that maximizes the objective function from possible 1-link modifications > utility/happiness from keeping current neighborhood

  20. drop tie if the target agent is among current-advisors, add tie if is among potential-advisors

  21. t <- t + 1

siena-like-model-behave-summerschool's People

Contributors

ceco51 avatar federico-bianchi avatar carrknight avatar

Watchers

Nicolas Payette avatar  avatar  avatar  avatar

siena-like-model-behave-summerschool's Issues

Fix homophily

  • We would like to pass a possible turtle-own variable selected through the interface as an argument of the homophily reporter:

to-report homophily [attribute]
report count out-request-neighbors with [attribute = [attribute] of myself]
end

  • We tried with an input widget in the interface taking strings but it looks like NetLogo is unable to parse the string and interpret it as the name of a turtle-own variable

Unstable Louvain outcome

Monitors displaying the number of communities and modularity calculated with Louvain algorithm dont' show a stable number after simulations ended

Easy way to compute correlation?

  • Is there an easier way to calculate correlation between in- and out-degree distributions (possible summary statistic to fit) other than with "stats" extension?
  • The two distribubions are two lists

Fix geodesic distance

  • We need to compute the average geodesic distance of the largest component only
  • With disconnected networks, the current monitor returns false
  • We unsuccessfully tried to define a reporter (now commented) to filter out other components

to-report avg-geodesic
let components nw:weak-component-clusters
let sorted-comps sort-by [ [c1 c2] -> count c1 > count c2 ] components
nw:set-context turtles with [member? self item 0 sorted-comps] requests
let avg-geo nw:mean-path-length
nw:set-context turtles requests
report avg-geo
end

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.