Misanthrope Housing Problem

Misanthrope Housing Problem preview image

1 collaborator

Default-person Robert Patchin (Author)

Tags

(This model has yet to be categorized with any tags)
Visible to everyone | Changeable by everyone
Model was written in NetLogo 5.2.0 • Viewed 159 times • Downloaded 18 times • Run 0 times
Download the 'Misanthrope Housing Problem' modelDownload this modelEmbed this model

Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)


Info tab cannot be displayed because of an encoding error

Comments and Questions

Please start the discussion about this model! (You'll first need to log in.)

Click to Run Model

to setup
  clear-all
  set-default-shape turtles "house"
  let i 1
  if Grid = true [set i HousesInRow]
  set-patch-size (700 / HousesInRow) 
  resize-world 0 (HousesInRow - 1) 0 i 
  ;; make green atoms on left
  ask patches with [pycor < i ]
    [ sprout 1 [ set color gray ] ]
  reset-ticks
end 

to go
  ;; asks to fill empty houses
  ;; move into the vacancy
let i true
  while [ i = true ] [ tick
      let Misanthrope one-of turtles with [color = grey]
          ifelse Misanthrope = nobody [set i false ]
          [ask Misanthrope [ set color green 
                            ask patch-here [ask turtles-on neighbors
                                                [set color red]]]]] 
end 

There is only one version of this model, created about 8 years ago by Robert Patchin.

Attached files

File Type Description Last updated
Misanthrope Housing Problem.png preview Preview for 'Misanthrope Housing Problem' about 8 years ago, by Robert Patchin Download

This model does not have any ancestors.

This model does not have any descendants.