# Child of Language Drift

No preview image

Model was written in NetLogo 5.0.4
•
Viewed 177 times
•
Downloaded 9 times
•
Run 0 times

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

## Comments and Questions

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

Click to Run Model

;; swtiches: learn-subset?,learn-local?,learn-nearest?,method-mean?,method-median?,method-one? ;; sliders: learn-subset,learn-radius breed [adults adult] breed [children child] adults-own [f1 f2 tempf1 tempf2 my-lifespan age my-group] ;children-own [f1 f2 my-group] to setup clear-all ; create-children population-size [ ; ; children start with no language ; set color blue ; set ycor random-ycor ; set xcor random-xcor ; ] ; only one can be chosen if network-clustered? [setup-cluster-network] if network-lattice? [setup-lattice-network] reset-ticks end to go ;; Run one generation (tick) ask adults [ set my-group adults ;; default to all adults ;; none of these are intended to work together, though they theoretically could if learn-local? [set my-group link-neighbors] ;; all adults neighbors ;; if learn-radius is set too small, too many children die isolated to graduate to fill dying adult slots. problem :/ ;if learn-subset? [set my-group n-of learn-subset my-group] ;; random N of adults ;if learn-nearest? [set my-group min-n-of learn-subset adults [distance myself]] ;; nearest N adults ifelse any? my-group ;; don't attempt learn if my-group is empty, instead die [listen] [ let neighbor-nodes turtle-set other adults in-radius 2 create-links-with neighbor-nodes [ if random-float 1 > link-chance [ die ] ] ] update ] ; ask adults [ ; set age age + 1 ;; increment age ; if age > my-lifespan [die] ;; die if new age exceeds my-lifespan ; ] ; ask n-of (population-size - count adults) children [ ; ; only enough children graduate to replace deaths ; set breed adults ; set color red ; ; children get lifespan upon graduation ; set my-lifespan random lifespan + 1 ; ] ; ask children [die] ; remaining children are cleaned out before 50 new created ; create-children population-size [ ; set color blue ; set ycor random-ycor ; set xcor random-xcor ; ] tick plot-vowel-space end to listen ; agent listens to all speaking agents (adults), computes idiolect ; learn-mean is one possible strategy: learn-mode ; noisy listening/learning is also possible ;; none of these are intended to interact, though it may be possible; this is still better than multiple setup buttons, because of the combinations ;; if none are picked, it's just pure noise effect if method-one? [learn-one] if method-mean? [learn-mean] if method-median? [learn-median] ; add noise as % of total (not current?) ;; this means that f2 has more absolute noise, because it's a larger value; problem? set tempf1 f1 + random-normal 0 noise-level * start-f1 set tempf2 f2 + random-normal 0 noise-level * start-f2 if f1 < 200 [set tempf1 200] if f2 < 500 [set tempf2 500] if f1 > 1200 [set tempf1 1200] if f2 > 3500 [set tempf2 3500] end to learn-mean ;;adopts mean of adults set tempf1 mean [f1] of my-group set tempf2 mean [f2] of my-group end to learn-one ;;randomly copies one adult set tempf1 one-of [f1] of my-group set tempf2 one-of [f2] of my-group end to learn-median ;;learns median of adults set tempf1 median [f1] of my-group set tempf2 median [f2] of my-group end to plot-vowel-space ask adults [ plotxy f2 f1] end to setup-cluster-network create-adults population-size / 2 [ ; initialize adult formants near start-f1,-f2 (use random-normal) ; use realistic f1 (700), f2 (2000), deviation set f1 random-normal start-f1 150 set f2 random-normal start-f2 500 set color red set ycor random-ycor set xcor random-xcor set my-lifespan random lifespan ] let num-links (average-node-degree * population-size) / 2 while [count links < num-links ] [ ask one-of adults [ let choice (min-one-of (other adults with [not link-neighbor? myself]) [distance myself]) if choice != nobody [ create-link-with choice ] ] ] ; make the network look a little prettier repeat 10 [ layout-spring adults links 0.3 (world-width / (sqrt population-size)) 1 ] end to update set f1 tempf1 set f2 tempf2 end to setup-lattice-network ; create the grid of nodes let grid-size 12 ask patches with [abs pxcor < (grid-size / 2) and abs pycor < (grid-size / 2)] [ sprout 1 [set breed adults] ] ask adults [ ; initialize adult formants near start-f1,-f2 (use random-normal) ; use realistic f1 (700), f2 (2000), deviation set f1 random-normal start-f1 150 set f2 random-normal start-f2 500 set color red ;set ycor random-ycor ;set xcor random-xcor set my-lifespan random lifespan ] ; create a directed network such that each node has a LINK-CHANCE percent chance of ; having a link established from a given node to one of its neighbors ask adults [ let neighbor-nodes turtle-set [turtles-here] of neighbors4 create-links-with neighbor-nodes [ if random-float 1 > link-chance [ die ] ] ] ; spread the nodes out ask adults [ setxy (xcor * (max-pxcor - 1) / (grid-size / 2 - 0.5)) (ycor * (max-pycor - 1) / (grid-size / 2 - 0.5)) ] end

There is only one version of this model, created over 7 years ago by Jeremy Needle.

## Attached files

No files

**Parent:** Language Drift

This model does not have any descendants.