📄 ---golancefinal9.nlogo
字号:
10149710320083.709000CC-WINDOW238489533679Command CenterBUTTON512077161NILsetupNIL1TOBSERVERTBUTTON82120153160NILgoT1TOBSERVERNILMONITOR478113601162Winner's StrategyWinner_Breed31PLOT6273244465Breed DistributionTimen. of agents1.0100.00.0100.0falsetruePENS"T" 1.0 0 -11352576 true"H" 1.0 0 -7566196 true"FR" 1.0 0 -65536 truePLOT251273481466Average Rank per BreedTimeAverage Rank1.0100.00.0100.0falsetruePENS"T" 1.0 0 -11352576 true"H" 1.0 0 -7566196 true"FR" 1.0 0 -65536 trueSLIDER3166242199Number_of_TortoisesNumber_of_Tortoises01001011NILSLIDER4198243231Number_of_HaresNumber_of_Hares01001011NILSLIDER5228243261Number_of_Free_RidersNumber_of_Free_Riders01001011NILSLIDER246164447197Follower_Energy_CreditFollower_Energy_Credit052.00.21NILSLIDER245197447230Leader_Energy_CreditLeader_Energy_Credit050.80.21NILSLIDER245229448262Energy_upper_BoundEnergy_upper_Bound0100511NILMONITOR610112775161T - Average Final Rankavg_final_rank_t31MONITOR610161775210H - Average Final Rankavg_final_rank_h31MONITOR610209775258FR - Average Final Rankavg_final_rank_f31SLIDER526277761310Multiplier_Tort_Vf_atEndGameMultiplier_Tort_Vf_atEndGame052.00.21NILSLIDER530313753346Forward_Visibility_MultiplierForward_Visibility_Multiplier053.00.21NIL@#$#@#$#@--------------------Go Lance! --------------------This model and documentation was written by Kristen Hassmiller and Rodolfo Sousa.The assignment:---------------Consider the following situation:A group of, say, 20 bike riders are competing in a long road race. In any pack of riders, the leader provides a big benefit to the other riders in the pack, and also receives a slight advantage over riding alone. What happens?1. Model, using whatever techniques you wish, the above scenario.2. Explicitly state your model and key assumptions.3. Summarize key results.4. Suggest some potentially interesting future directions and questions for the model.5. Suggest some standard social science scenarios that could be usefully modeled using such a process.How our model works (quick summary):------------------------------------This project models the movement of bike riders competing in a long road race. Each biker follows a simple set of rules, defined by its strategy (tortoise, hare, free-rider), defined below. The program was written in NetLogo, and is available to download from this page. The applet can be run directly to explore the model.The model facilitates exploration of the impact of biker strategy and ability on outcome, as well as cooperation behavior (the formation of packs).HOW TO USE IT-------------Click on the SETUP button to set up the bikers. Set the NUMBER slider to change the number of bikers assuming each strategy. (NOTE: Update to reflect actual model.)Click on GO to start the bike riders moving. Note that you made need to scroll to the right to follow the riders as they progress beyond the edge of your screen (the race may be longer than your screen). MODEL DETAILS: The Road-----------------------In this model, the road is broken into unit spaces. Except for the starting space, two bikers can never occupy the same space. The road is one space wide, so bikers can only pass if they have enough ability to overtake all bikers in front of them. MODEL DETAILS: Biker Variables------------------------------color color based on strategy (or breed)eave energy on average (reflects ability) 1 + random 10est energy stock at t initialized to zero, accvf forward visibility 4 * eavemove where biker moves in a time step d_move where biker desires to move prevPt where biker was before step toFollow is there a pack to join (yes=1) rank position in the race goes to zero when complete race (modelling quirk)MODEL DETAILS: Global Variables-------------------------------ticks time step counter initialized to 0credFollow energy credit for following (to est) set at 2lead fraction of credFollow given to leader set at 8 (NEEN TO CHANGE!)nt # of bikers with tortoise strategy 8nh # of bikers with hare strategy 8nf # of bikers with free-rider strategy 8numFinish counter for bikers program stops when = nt+nh+nfMODEL DETAILS: Biker Strategies-------------------------------Tortoise: Maintain average speed; don誸 push anything! Travel as close to eave as possible, moving back if spaces are full with no preference for joining packs or riding alone. If the finish line is in sight, use all of est to bolt ahead in the endgame. NOTE: As a reward for riding slow and steady throughout the race, the tortoise is able to see the finish line further than their visibility, allowing them to bolt once the finish line is within 4*vf (4 * their visibility).Hare:Give it all you have got; full exhaustion! Travel as close to eave+est as possible, moving back if spaces are full with no preference for joining packs or riding aloneFree-Rider: Take the easy way (ride in the back of packs and bolt ahead when possible)Join the pack that is as far ahead as possible, but no further than min(biker誷 visibility, eave+est). If no pack is available, move eave and save stored energy.MODEL DETAILS: Action----------------------Agent Creation: Agents are created by strategy type: Tortoise; Hare; Free-rider. It is possible to modify the order of breed creation to investigate any bias created.Schedule: 1. Move with asynchronous updating, move sequence = creation rank2. Update energy stock, est3. Verify if race is completed (if so, assign rank)4. Stopping criteria: if biker crosses the finish line, they die and numFinish is incremented by one. The model should stop running when all agents have crossed the finish line.NOTE: The sequencing assumption is poor. Ideally, initial starting should be either random or ranked by eave. Subsequent update should be ranked by position (high rank agents move first). We are not sure how to alter order of update on NetLogo. From the FAQ on the NetLogo documentation page (http://ccl.northwestern.edu/netlogo/docs/): QUESTION: How does NetLogo decide when to switch from agent to agent when running code? If you ask turtles, or ask a whole breed, the turtles are scheduled for execution in ascending order by ID number. If you ask patches, the patches are scheduled for execution by row: left to right within each row, and starting with the top row. If you ask a different agentset besides the set of all turtles or patches or a breed, then the execution order will vary according to how the agentset was constructed. The execution order is chosen deterministically and reproducibly, though, and will remain the same if you ask the same agentset multiple times. In a future version of NetLogo, we plan to add an option for randomized scheduling. Once scheduled, an agent's "turn" ends only once it performs an action that affects the state of the world, such as moving, or creating a turtle, or changing the value of a global, turtle, or patch variable. (Setting a local variable doesn't count.) NetLogo's scheduling mechanism is completely deterministic. Given the same code and the same initial conditions, the same thing will always happen, if you are using the same version of NetLogo. In general, we suggest you write your NetLogo code so that it does not depend on a particular scheduling mechanism. We make no guarantees that the scheduling algorithm will remain the same in future versions. MODEL DETAILS: Caveat---------------------We looked at NetLogo for the very first time ever two days ago. Though things seem to be working as they should, it is very possible that there are errors in this program. OBSERVATIONS ON THE MODEL-------------------------1. The model is conceptualized such that riding in a pack confers some benefit (accumulation of energy in est). Howver, it comes at some cost; breaking out of a pack requires enough energy (stored or possessed through ability) to overcome all adjacent riders.2. In general, passing requires enough saved energy to pass all riders in front, which is reasonable given bikers incentive to stop others from passing.3. Bikers forward visibility (vf) varies, and is fully correlated with their ability. THis is assumption is justified by the facts that: a/ the faster a biker is riding (controlled by eave, or ability), the further ahead they should be able to see; and, b/ riders with more ability (higher eave) are often better riders and are more aware of their surroundings. OBSERVATIONS ON RESULTS-----------------------NEED TO WRITE.POSSIBLE DEVELOPMENTS AND ALTERNATIVES--------------------------------------Strategies: Add more/different strategies, including strategies that are based on perceptions of others (characteristics and/or strategy) and cooperation. Consider implementing an El Farol type of approach
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -