Find a Partner

No preview image

1 collaborator

Default-person Stina Krist (Author)

Tags

(This model has yet to be categorized with any tags)
Model group LS426-2012 | Visible to everyone | Changeable by the author
Model was written in NetLogo 5.0RC7 • Viewed 523 times • Downloaded 34 times • Run 0 times
Download the 'Find a Partner' modelDownload this modelEmbed this model

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


WHAT IS IT?

This is a model of how students might pair up in a classroom. Currently, students try to find someone close to them that has a similar ability and popularity. As time goes on, students get less picky and will accept poorer matches. The students are colored according to ability, with the higher-ability students being a lighter shade of yellow.

HOW IT WORKS

The students try to pair with close-by students. They will pair up with a student as long as the average difference between their qualities (ability and popularity) is less than their pickiness. The pickiness of the students decreases over time, and the distance they will look for a partner increases over time.

When two students are paired, they turn into smiley faces, and a link between them is created. The link is shaded based on their difference in ability. Larger differences in ability have darker colors. The blue patch behind one of the students matched shows the average ability of the pair (lighter is higher average). The orange patch behind one of the students matched shows the average popularity of the pair (lighter is higher average).

HOW TO USE IT

To set up the "students" in the class, click the setup button. The model runs after the go button is clicked. The number of students paired and a graph of the number are shown on the left. Histograms of the differences in the characteristics of the students are shown at the bottom.

THINGS TO NOTICE

Students seem to be able to pair pretty well such that there are no huge differences in ability or popularity in pairs.

THINGS TO TRY

Try changing how quickly the pickiness decreases.

EXTENDING THE MODEL

One way to extend the model is to create new rules for pairings. One idea we came up with was to try to pair up with someone who is more popular or has a higher ability than you.

Another way to extend the model would be to include a teacher that randomly walks around between students and pairs them up with the student next to them.

NETLOGO FEATURES

We decided to model a pairing by linking two turtles together, so we used the primitive link in our model.

RELATED MODELS

This model may be similar to many network models.

CREDITS AND REFERENCES

Created by Stina and Elizabeth (a reference to the model's URL on the web if it has one, as well as any other necessary credits, citations, and links)

Comments and Questions

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

Click to Run Model

globals [
  ;p-increase
  scope
]

turtles-own [
  picky ;allowable distance between your average scores
  ability ;how smart you are
  popularity ;how cool you are
  no-match? ;if you have a partner or not...true = no partner, false = partner
  buddy
]

links-own[
  av-ability
  av-pop
  dif-ability
  dif-pop
]

to setup
  clear-all
  reset-ticks
  let yrepeat 2
  let xrepeat 2
  let yoffset 6
  let xoffset -10
  repeat rows [
    repeat columns [ create-turtles 1 [ ;;one of Nathan's suggestions was to put them into 'desk' formation, it made it easier to have them pick a turtle
    set shape "person"
    set ycor (yrepeat + yoffset)
    set xcor (xrepeat + xoffset)
    set xrepeat (xrepeat + 2)
    set picky 0
    set ability random 10
    set popularity random 10
    set no-match? true
    set color scale-color 40 (ability + 1) 0 10];sets the color of the turtles according to ability level. 
    ;The first number is the color that is shaded
  ]
    set yrepeat (yrepeat - 2)
    set xrepeat 2
  ]
  ;set p-increase .1
  set scope 2
end 

to go
  if all? turtles [no-match? = false]
  [stop]
  ask turtles [ 
    set picky (picky + p-increase) 
    ]
  ask turtles [
    if no-match? ;ifelse no-match?
    [find-partner] ;true - search for partners
    ;[set shape "face happy"] ;false - have a partner, change shape is just so we can see it for now
  ]
set scope (scope + 2) ;look further out for a partner
tick 
end 

to find-partner
  let close-turtle one-of other turtles with [distance myself <= scope and no-match? = true] ;pick one that's close and doesn't already have a partner
  let your-score (([ability] of close-turtle + [popularity] of close-turtle) / 2)
  let my-score ((ability + popularity) / 2)
  if abs (your-score - my-score) <= picky ;this should be the same for both, right?  they should each have the same pickyness, and the abs difference between their mean scores should be the same?
  [set no-match? false ;I have a partner
    set buddy close-turtle ;sets who the turtle's partner is
    ask close-turtle [ ;you have a partner
      set no-match? false
      set buddy myself] ;sets who the matched turtle's partner is
  ]
  ifelse no-match? = false and [no-match?] of close-turtle = false ;if we are both ok with matching
  [partner] ;then we become partners and do something TBD
  [set no-match? true ask close-turtle [set no-match? true] ] ;if not, we both go back to being partnerless
end 

to partner
  ;set color black this is a place holder - still need to figure out what we want them to do. half of them turn black and their partner becomes a smiley face in the go procedure
  ;;maybe they could draw a line to their partner?  what would be a useful thing to see?
;move-to buddy
;fd 1
set shape "face happy"
create-link-with buddy
ask link-with buddy 
  [set av-ability (([ability] of end1 + [ability] of end2) / 2)
    set av-pop (([popularity] of end1 + [popularity] of end2) / 2)
    set dif-ability abs (([ability] of end1 - [ability] of end2) / 2)
    set dif-pop abs (([popularity] of end1 - [popularity] of end2) / 2)
    set color scale-color 111 (dif-ability + 1) 7 0
      ] ;links with greater difference in ability are darker colors
;sets background color according to average ability + popularity
set pcolor scale-color 90 ((ability + [ability] of buddy + 1) / 2) 0 10 ;lighter blue means higher average ability
ask buddy [
  set pcolor scale-color 20 ((popularity + [popularity] of buddy + 1) / 2) 0 10 ;lighter orange means higher average popularity
  set shape "face happy"
]
end 

to-report number-paired
  report count turtles with [no-match? = false]
  ;histogram-from links [dif-ability]
  ;histogram-from links [dif-popularity] 
end 

;;do we want to add any sliders?

There is only one version of this model, created over 13 years ago by Stina Krist.

Attached files

No files

This model does not have any ancestors.

This model does not have any descendants.