Judicial Review
No preview image
Model was written in NetLogo 6.0.4
•
Viewed 76 times
•
Downloaded 12 times
•
Run 0 times
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
breed [govs gov] breed [courts court ] globals [ court-alive? ;is the court still in operation? court-invalidated-now? ;what did the court do this round? (true or false) gov-defied-now? ;did anyone defy this round (true or false)? gov-complied-now? ;did everyone comply this round (true of false)? gov-defied-now-count ;# of govs defying this turn gov-complied-now-count ;# of govs complying this turn last-turn-defied ;percentage defiance in last turn second-last-turn-defied ; third-last-turn-defied ; fourth-last-turn-defied ; fifth-last-turn-defied ; sixth-last-turn-defied ; seventh-last-turn-defied ; eighth-last-turn-defied ; ninth-last-turn-defied ; tenth-last-turn-defied ; eleventh-last-turn-defied ; twelfth-last-turn-defied ; thirteenth-last-turn-defied ; fourteenth-last-turn-defied ; fifteenth-last-turn-defied ; sixteenth-last-turn-defied ; seventeenth-last-turn-defied ; eighteenth-last-turn-defied ; nineteenth-last-turn-defied ; twentieth-last-turn-defied ; total-number-invalidations ;how many times has the court invalidated law/policy? scope-count ;a running sum of the number of times gov't agents have been affected by court invalidations total-number-defiances ;how many times have gov't agents defied? total-number-compliances ;how many times have gov't agents complied? number-of-cases-defied ;how many cases with at least one defiance? number-of-cases-complied ;how many cases with no defiance? case-defy-average ;number of times a decision has had at least one defiance / number of invalidations case-comply-average ;number of times a decision has had no defiances / number of invalidations gov-defy-average ;the rate of defiance by gov't agents moving-defy-average ;average rate of defiance over the last 20 invalidations gov-comply-average ;the rate of compliance by gov't agents sum-salience-weights ;a running tally of the importance of decisions standing-defiance-average ;a running tally of the average defiance of decisions weighted-average-defiance ; average-defiance rate of decisions weighted by case-salience failure-count ;number of times the court has 'failed' number-of-unhappy-govs ;the number of gov't agents who are disatisfied with the court percentage-of-unhappy-govs ;the percentage of gov't agents who are disatisfied with the court ;;; case variables ;;; case-salience ;how important is this case in general? max-case-scope ;the maximum number of gov't agents potentially affected by the outcome of this case min-case-scope ;the minimum number of gov't agents potentially affected by the outcome of this case minimalist? ;is the court being minimalist? (true of false) scope ;number of gov't agents actually affected by the case outcome court-payoff ;an observer-based measure of what court scores (potential-court-payoff * gov-complied-now-count) court-score ;an observer-based tally of the court's accumulated score court-case-preference ;an observer-based record of the court's preference (1 to invalidate; 0 to uphold) court-case-salience ;an observer-based measure of how important the case is to the court case-defiance-average ;the proportion of Gov't Agents defying this case ] courts-own [ score ;current payoff ] govs-own [ gov-ideology ;how likely is the gov't agent to disagree with the court? (0.0-1.0) gov-case-preference ;does the gov't agent support the law/policy at issue (1 if yes; 0 if no) gov-payoff ;gov-case-salience gov-court-utility ;the Gov't Agent's expected policy utitlity of retaining an independent Court unhappy? ;does the Gov't Agent expect the Court to cost it a net loss in policy utitily? ] to setup clear-all ; create a court and place it in the center of the world set-default-shape courts "house" create-courts 1 [ set heading 270 set size 5 set color 106 ] ; create govs and place them in a cicle set-default-shape govs "face neutral" create-govs NUMBER-OF-GOV-AGENTS [ set size 3 set color white ] layout-circle govs (max-pxcor - 1) ask govs [set gov-ideology random-normal polarization fragmentation] ; set a blank slate set court-alive? true set number-of-unhappy-govs 0 set total-number-invalidations 0 set total-number-compliances 0 set total-number-defiances 0 set number-of-cases-defied 0 ask courts [set score 0] set court-score 0 set scope-count 0 set failure-count 0 set gov-defy-average 0 set case-defy-average 0 set moving-defy-average 0 set case-comply-average .5 set gov-comply-average .5 set case-defiance-average 0 set sum-salience-weights 0 set weighted-average-defiance 0 ask govs [set gov-court-utility 0 set unhappy? 0] reset-ticks end ;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Runtime Procedures;;; ;;;;;;;;;;;;;;;;;;;;;;;;; to play if court-alive? [play-a-round tick prepare-next-round] end to play-a-round set gov-defied-now-count 0 set gov-complied-now-count 0 set case-salience random-normal .5 .15 set max-case-scope random NUMBER-OF-GOV-AGENTS set min-case-scope random (max-case-scope * .5) set number-of-unhappy-govs 0 ask govs [ifelse random-float 1.0 >= .5 [set case-salience case-salience + random-float .15] [set case-salience case-salience - random-float .15]] ifelse random-float 1.0 >= .5 [set court-case-salience case-salience + random-float .15] [set court-case-salience case-salience - random-float .15] ifelse polarization >= random-float 1.0 [set court-case-preference 1] [set court-case-preference 0] ;run the strategy selected for the court ask courts [run court-strategy] ask govs [ifelse gov-ideology >= random-float 1.0 [set gov-case-preference 1] [set gov-case-preference 0]] ;run the strategy selected for the govs ifelse minimalist? [set scope min-case-scope] [set scope max-case-scope] ask n-of scope govs [get-gov-payoff if court-invalidated-now? [run gov-strategy]] set case-defiance-average gov-defied-now-count / (scope + 1) ask govs [if gov-court-utility < 0 [set unhappy? 1] ] ask govs [if gov-court-utility > 0 [set unhappy? -1]] ask govs [if gov-court-utility = 0 [set unhappy? 0]] ask govs [if unhappy? = 1 [set number-of-unhappy-govs number-of-unhappy-govs + 1]] ask govs [if unhappy? = 1 [set shape "face sad"]] ask govs [if unhappy? = -1 [set shape "face happy"]] ask govs [if unhappy? = 0 [set shape "face neutral"]] set percentage-of-unhappy-govs (number-of-unhappy-govs / NUMBER-OF-GOV-AGENTS) ifelse (dissatisfaction-threshold < percentage-of-unhappy-govs) and (defiance-threshold < moving-defy-average) [ifelse random-float 1.0 < gov-defy-average [set court-alive? false] [set court-alive? true]] [set court-alive? true] ifelse court-alive? [ask courts [set shape "house"]] [ask courts [set shape "x" set failure-count failure-count + 1]] end to prepare-next-round update-invalidations if court-invalidated-now? [update-defiance update-compliance update-defiance-history update-global-defy-average update-moving-defy-average update-global-comply-average update-court-payoff update-scope-count update-gov-defy-average update-gov-comply-average update-weighted-average-defiance ] ask courts [get-court-payoff] ask courts [set label pay-off] update-court-score end to update-invalidations ifelse court-invalidated-now? [set total-number-invalidations total-number-invalidations + 1] [set total-number-invalidations total-number-invalidations] end to update-defiance ifelse court-invalidated-now? [set total-number-defiances total-number-defiances + gov-defied-now-count] [set total-number-defiances total-number-defiances] ifelse court-invalidated-now? [ifelse gov-defied-now-count > 0 [set gov-defied-now? true] [set gov-defied-now? false]] [set gov-defied-now? false] ifelse court-invalidated-now? [ifelse gov-defied-now? [set number-of-cases-defied number-of-cases-defied + 1] [set number-of-cases-defied number-of-cases-defied]] [set number-of-cases-defied number-of-cases-defied] end to update-compliance ifelse court-invalidated-now? [set total-number-compliances total-number-compliances + gov-complied-now-count] [set total-number-compliances total-number-compliances] ifelse court-invalidated-now? [ifelse gov-defied-now-count > 0 [set gov-complied-now? false] [set gov-complied-now? true]] [set gov-complied-now? false] ifelse court-invalidated-now? [ifelse gov-complied-now? [set number-of-cases-complied number-of-cases-complied + 1] [set number-of-cases-complied number-of-cases-complied]] [set number-of-cases-complied number-of-cases-complied] end to update-court-payoff ifelse minimalist? [set court-payoff (case-salience * gov-complied-now-count)] [set court-payoff (case-salience * gov-complied-now-count)] end to update-defiance-history ifelse court-invalidated-now? [ set twentieth-last-turn-defied nineteenth-last-turn-defied set nineteenth-last-turn-defied eighteenth-last-turn-defied set eighteenth-last-turn-defied seventeenth-last-turn-defied set seventeenth-last-turn-defied sixteenth-last-turn-defied set sixteenth-last-turn-defied fifteenth-last-turn-defied set fifteenth-last-turn-defied fourteenth-last-turn-defied set fourteenth-last-turn-defied thirteenth-last-turn-defied set thirteenth-last-turn-defied twelfth-last-turn-defied set twelfth-last-turn-defied eleventh-last-turn-defied set eleventh-last-turn-defied tenth-last-turn-defied set tenth-last-turn-defied ninth-last-turn-defied set ninth-last-turn-defied eighth-last-turn-defied set eighth-last-turn-defied seventh-last-turn-defied set seventh-last-turn-defied sixth-last-turn-defied set sixth-last-turn-defied fifth-last-turn-defied set fifth-last-turn-defied fourth-last-turn-defied set fourth-last-turn-defied third-last-turn-defied set third-last-turn-defied second-last-turn-defied set second-last-turn-defied last-turn-defied ifelse gov-defied-now? [set last-turn-defied 1] [set last-turn-defied 0] ] [ set twentieth-last-turn-defied twentieth-last-turn-defied set nineteenth-last-turn-defied nineteenth-last-turn-defied set eighteenth-last-turn-defied eighteenth-last-turn-defied set seventeenth-last-turn-defied seventeenth-last-turn-defied set sixteenth-last-turn-defied sixteenth-last-turn-defied set fifteenth-last-turn-defied fifteenth-last-turn-defied set fourteenth-last-turn-defied fourteenth-last-turn-defied set thirteenth-last-turn-defied thirteenth-last-turn-defied set twelfth-last-turn-defied twelfth-last-turn-defied set eleventh-last-turn-defied eleventh-last-turn-defied set tenth-last-turn-defied tenth-last-turn-defied set ninth-last-turn-defied ninth-last-turn-defied set eighth-last-turn-defied eighth-last-turn-defied set seventh-last-turn-defied seventh-last-turn-defied set sixth-last-turn-defied sixth-last-turn-defied set fifth-last-turn-defied fifth-last-turn-defied set fourth-last-turn-defied fourth-last-turn-defied set third-last-turn-defied third-last-turn-defied set second-last-turn-defied second-last-turn-defied] end to update-global-defy-average set case-defy-average (number-of-cases-defied) / (total-number-invalidations) end to update-global-comply-average set case-comply-average (number-of-cases-complied) / (total-number-invalidations) end to update-weighted-average-defiance set standing-defiance-average standing-defiance-average + case-defiance-average set sum-salience-weights sum-salience-weights + (case-salience * scope) set weighted-average-defiance (standing-defiance-average / (sum-salience-weights + 1)) end to update-scope-count ifelse court-invalidated-now? [ifelse minimalist? [set scope-count scope-count + min-case-scope] [set scope-count scope-count + max-case-scope]] [set scope-count scope-count] end to update-gov-defy-average set gov-defy-average (total-number-defiances / (scope-count + 1)) end to update-gov-comply-average set gov-comply-average (1 - gov-defy-average) end to update-moving-defy-average ifelse court-invalidated-now? [set moving-defy-average (last-turn-defied + second-last-turn-defied + third-last-turn-defied + fourth-last-turn-defied + fifth-last-turn-defied + sixth-last-turn-defied + seventh-last-turn-defied + eighth-last-turn-defied + ninth-last-turn-defied + tenth-last-turn-defied + eleventh-last-turn-defied + twelfth-last-turn-defied + thirteenth-last-turn-defied + fourteenth-last-turn-defied + fifteenth-last-turn-defied + sixteenth-last-turn-defied + seventeenth-last-turn-defied + eighteenth-last-turn-defied + nineteenth-last-turn-defied + twentieth-last-turn-defied) / 20] [set moving-defy-average moving-defy-average] end to update-salience-effect-average end to-report pay-off; Turtle reporter report precision score 2 end to-report average-score-by-invalidations ; Turtle reporter report precision (score / (total-number-invalidations + 1)) 3 end to-report average-score-by-ticks ; Turtle reporter report precision (score / (ticks + 1)) 3 end to-report average-defiance ; Turtle reporter report precision (number-of-cases-defied / (total-number-invalidations + 1)) 3 end ;;;;;;;;;;;;;;;;;;;;;;;; ;;; Court Strateegies ;;; ;;;;;;;;;;;;;;;;;;;;;;;; to Court-Default set minimalist? one-of [true false] ifelse (court-case-preference = 1) and (random-float 1.0 <= case-salience) [set court-invalidated-now? true] [set court-invalidated-now? false] end to Avoider set minimalist? false ifelse (court-case-preference = 1) and (case-salience < .5) [set court-invalidated-now? true] [set court-invalidated-now? false] end ;;;;;;;;;;;;;;;;;;;;;; ;;; Gov Strategies ;;; ;;;;;;;;;;;;;;;;;;;;;; to Defy-randomly ifelse random-float 1.0 >= .5 [set gov-defied-now-count gov-defied-now-count + 1 set shape "face sad" set color red] [set gov-complied-now-count gov-complied-now-count + 1 set shape "face happy" set color green] end to Defy-never set gov-complied-now-count gov-complied-now-count + 1 set shape "face happy" set color green end to Defy-always set gov-defied-now-count gov-defied-now-count + 1 set shape "face sad" set color red end to Gov-Default ifelse total-number-invalidations < 1 [ifelse (gov-case-preference = 1) and (random-float 1.0 <= (case-salience + EXPECTATION-OF-DEFIANCE / 2)) [set gov-defied-now-count gov-defied-now-count + 1 set color red ] [set gov-complied-now-count gov-complied-now-count + 1 set color green]] [ifelse (gov-case-preference = 1) and (random-float 1.0 <= (case-salience + standing-defiance-average / 2)) [set gov-defied-now-count gov-defied-now-count + 1 set color red ] [set gov-complied-now-count gov-complied-now-count + 1 set color green]] end ;;;;;;;;;;;;;;; ;; Payoffs ;;;; ;;;;;;;;;;;;;;; to get-court-payoff ; ifelse court-invalidated-now?[set score score + court-payoff ][set score score] end to update-court-score ifelse court-invalidated-now? [set court-score court-score + court-payoff] [set court-score court-score] end to get-gov-payoff ifelse court-invalidated-now? [ifelse gov-case-preference = 1 [set gov-court-utility gov-court-utility - case-salience] [set gov-court-utility gov-court-utility + case-salience]] [ifelse gov-case-preference = 1 [set gov-court-utility gov-court-utility + case-salience] [set gov-court-utility gov-court-utility]] end
There is only one version of this model, created about 5 years ago by Alex Schwartz.
Attached files
No files
This model does not have any ancestors.
This model does not have any descendants.