Exam session

Exam session preview image

1 collaborator

Aga_viburno Aga Viburno (Author)

Tags

education 

Tagged by Aga Viburno almost 11 years ago

exams 

"students"

Tagged by Aga Viburno almost 11 years ago

students 

Tagged by Aga Viburno almost 11 years ago

Visible to everyone | Changeable by everyone
Model was written in NetLogo 5.0.4 • Viewed 602 times • Downloaded 46 times • Run 0 times
Download the 'Exam session' modelDownload this modelEmbed this model

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

;; Symulacja Agi z dedykacją dla poniższych 
globals [ slow? speed ]       
breed [ students student ]
breed [ wojteks wojtek ]
breed [ radeks radek ]
breed [ adams adam ]
breed [ books book ]
turtles-own [ knowledge ]

to setup
  clear-all
  set-default-shape radeks "radek"
  create-radeks 1
  [
    set size 4
    jump 10 + random-float (max-pxcor - 40)
  ]
  set-default-shape books "book"
  create-books initial-number-books
  [
    set size 3
     jump 16 + random-float (max-pxcor - 20)
  ]
  ask patches [ set pcolor 103 ]
  set-default-shape students "student"
  create-students initial-num-students
  [
    set size 2
    setxy random-xcor random-ycor
    set knowledge random (3 * student-gain-from-reading)
  ]
  set-default-shape wojteks "wojtek"
  create-wojteks 1
  [
    set size 4
    set slow? false 
    set speed 1 
  ]
  set-default-shape adams "adam"
  create-adams 1
  [
    set size 4
    jump 20 + random-float (max-pxcor - 30)
  ]
  display-labels
  reset-ticks
end 

to go
  if not any? turtles [ stop ]
  ask students [
      move
      set knowledge knowledge - 1
      read-books
      death
  ]
   ask books [
    reprint-books
]
  ask wojteks [
    fd speed ]
  ask wojteks [
    run word breed "-speak"
  ]
  every 5 
[ 
   ifelse not slow? 
   [ 
     set speed 0.05 
     set slow? true 
   ] 
   [ 
     set speed 1 
     set slow? false 
   ]  
] 
 ask wojteks [
    fail-students
  ]
  tick
end 

to wojteks-speak   ;; bad Wojtek!!!
  set label "failed!"
end 

to fail-students
  let prey one-of students-here
  if prey != nobody
     [
       ask prey [ die ]
   ]
end  

to read-books
  ask students [
  set knowledge knowledge * 2
  ]
  let prey one-of books-here
  if prey != nobody
     [
       ask prey [ die ]
   ]
end  

to reprint-books
if random-float 200 < book-reprint [
set knowledge ( knowledge / 4 )
hatch 1 [ rt random-float 360 fd 1 ]
]
end 

to death
  if knowledge < 0 [ die ]
end 

to move
  rt random 20
  lt random 30
  fd 1
end 

to display-labels
  ask students [ set label "" ]
  if show-knowledge? [
    ask students [ set label round knowledge ]
  ]
end 

There is only one version of this model, created almost 11 years ago by Aga Viburno.

Attached files

File Type Description Last updated
Exam session.png preview Preview for 'Exam session' almost 11 years ago, by Aga Viburno Download

This model does not have any ancestors.

This model does not have any descendants.