סיבוב מנטלי-מודל מעודכן-לא סופי
No preview image
Model was written in NetLogo 5.0.3
•
Viewed 189 times
•
Downloaded 13 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
globals [ is-answered? ;; this is a flag that indicates whether question was answered, if it does(true or false) set this flag to TRUE - this is how we know we want to continue to the next question correct-answer-counter questions-counter max-questions max-rounds round-counter ] ;;; instead of TURTLES you can define your own agents: breed [questions question] breed [answers answer] ;;; this will be one of the answer agent attributes answers-own[ am-i-the-answer? id] to setup clear-all ;reset-timer set-current-plot-pen "round1" set is-answered? false set correct-answer-counter 0 set questions-counter 1 set max-questions 10 set max-rounds number-of-rounds set round-counter 1 ;;; setting first question - next question will be set in the go function create-questions 1 [set shape "shape1" set heading 0 setxy 0 6 set size size * 19 ] ;;; setting first answers create-answers 1 [set shape "shape1" set heading 0 setxy 10 -6 set heading 90 set size size * 15 set am-i-the-answer? true set id 1] create-answers 1 [set shape "shape2" set heading 0 setxy 0 -6 set size size * 15 set am-i-the-answer? false set id 2] create-answers 1 [set shape "shape4" set heading 0 setxy -10 -6 set size size * 15 set am-i-the-answer? false set id 3] reset-ticks end to go tick if ticks <= 1 [ reset-timer ] if mouse-down? and not is-answered? [ if mouse-ycor > [ycor - size / 3] of one-of answers and mouse-ycor < [ycor + size / 3] of one-of answers [ ask answers[ if mouse-xcor > xcor - size / 3 and mouse-xcor < xcor + size / 3 [ ifelse am-i-the-answer? [ ;set size 10 set shape "face happy" ;wait set is-answered? true set correct-answer-counter correct-answer-counter + 1 display ] [ set shape "face sad" ;wait 1 set is-answered? true display ] ] ] ] ] if is-answered? [ plotxy questions-counter timer reset-timer set questions-counter questions-counter + 1 ;;; go to the next question wait 0.5 ; reset-timer if questions-counter > max-questions ;;round ended [ print (word "You got " correct-answer-counter " correct answers out of " max-questions "!") ifelse round-counter < max-rounds [ set round-counter round-counter + 1 set-current-plot-pen (word "round" round-counter) set questions-counter 1 ] [stop] ] ;;; if no more questions print results and stop the main GO loop ;Walaa - I would suggest moving the question definition to outer function or a question genrator that we can work on when we meet if questions-counter = 1 [ ask questions [set shape "shape1" set heading 0 ] ;;; setting first answers ask answers with [id = 1] [set shape "shape1" set heading 90 set am-i-the-answer? true ] ask answers with [id = 2] [set shape "shape2" set heading 0 set am-i-the-answer? false ] ask answers with [id = 3] [set shape "shape4" set heading 0 set am-i-the-answer? false ] ] if questions-counter = 2 [ ;;;; set next question ask questions [set shape "shape5"] ask answers with [id = 1] [ set heading 0 set shape "shape6" set am-i-the-answer? false ] ask answers with [id = 2] [ set heading 90 set shape "shape7" set am-i-the-answer? false ] ask answers with [id = 3] [ set heading 180 set shape "shape5" set am-i-the-answer? true ] ] if questions-counter = 3 [ ;;;; set next question ask questions [set shape "shape8"] ask answers with [id = 1] [ set heading 0 set shape "shape9" set am-i-the-answer? false ] ask answers with [id = 2] [ set heading 120 set shape "shape8" set am-i-the-answer? true ] ask answers with [id = 3] [ set heading 90 set shape "shape10" set am-i-the-answer? false ] ] if questions-counter = 4 [ ;;;; set next question ask questions [set shape "shape11"] ask answers with [id = 1] [ set heading 0 set shape "shape12" set am-i-the-answer? false ] ask answers with [id = 2] [ set heading 120 set shape "shape11" set am-i-the-answer? true ] ask answers with [id = 3] [ set heading 90 set shape "shape13" set am-i-the-answer? false ]] if questions-counter = 5 [ ;;;; set next question ask questions [set shape "shape14"] ask answers with [id = 1] [ set heading 0 set shape "shape15" set am-i-the-answer? false ] ask answers with [id = 2] [ set heading 90 set shape "shape16" set am-i-the-answer? false ] ask answers with [id = 3] [ set heading 180 set shape "shape14" set am-i-the-answer? true ] ] if questions-counter = 6 [ ;;;; set next question ask questions [set shape "shape17"] ask answers with [id = 1] [ set heading 90 set shape "shape17" set am-i-the-answer? true ] ask answers with [id = 2] [ set heading 90 set shape "shape18" set am-i-the-answer? false ] ask answers with [id = 3] [ set heading 180 set shape "shape19" set am-i-the-answer? false]] if questions-counter = 7 [ ;;;; set next question ask questions [set shape "shape20"] ask answers with [id = 1] [ set heading 0 set shape "shape21" set am-i-the-answer? false ] ask answers with [id = 2] [ set heading 45 set shape "shape20" set am-i-the-answer? true ] ask answers with [id = 3] [ set heading 90 set shape "shape22" set am-i-the-answer? false ] ] if questions-counter = 8 [ ;;;; set next question ask questions [set shape "shape23"] ask answers with [id = 1] [ set heading 0 set shape "shape24" set am-i-the-answer? false ] ask answers with [id = 2] [ set heading 120 set shape "shape23" set am-i-the-answer? true ] ask answers with [id = 3] [ set heading 90 set shape "shape25" set am-i-the-answer? false ]] if questions-counter = 9 [ ;;;; set next question ask questions [set shape "shape26"] ask answers with [id = 1] [ set heading 90 set shape "shape26" set am-i-the-answer? true ] ask answers with [id = 2] [ set heading 0 set shape "shape27" set am-i-the-answer? false ] ask answers with [id = 3] [ set heading 180 set shape "shape28" set am-i-the-answer? false]] if questions-counter = 10 [ ;;;; set next question ask questions [set shape "shape29"] ask answers with [id = 1] [ set heading 0 set shape "shape30" set am-i-the-answer? false ] ask answers with [id = 2] [ set heading 90 set shape "shape31" set am-i-the-answer? false ] ask answers with [id = 3] [ set heading 60 set shape "shape29" set am-i-the-answer? true ] ] ;;;; set next answers ;;; for each and every answer set the "am-i-the-answer?" value to TRUE or FALSE set is-answered? false ] end
There is only one version of this model, created about 12 years ago by Walaa Esawi.
Attached files
No files
This model does not have any ancestors.
This model does not have any descendants.