Nigel Gilbert posted this summary of exercises for ABM students on the NetLogo
list. Some good ideas. -Steve > -----Original Message----- > From: Nigel Gilbert [mailto:n.gilbert at surrey.ac.uk] > Sent: Saturday, April 21, 2007 3:11 PM > To: netlogo-users at yahoogroups.com > Subject: [netlogo-users] Exercises for beginners: summary > > On 7 April, I asked for suggestions for programming exercises > for those new to NetLogo or to programming. Many members of > the list kindly volunteered ideas and advice. I summarise > briefly below some of these (the original post is appended). > > Several people suggested that the best advice is to look at > and modify existing programs, such as those in the Model > Library. I agree that this is good advice, but I don't think > it is sufficient: at some stage, beginners need to be > persuaded to strike out on their own if they are become modellers. > > Ken Kahn suggested examples from Brian Harvey's Computer > Science Logo Style > http://www.cs.berkeley.edu/~bh/v2-toc2.html > <http://www.cs.berkeley.edu/~bh/v2-toc2.html> > > James Steiner suggested a 'chase and trace' program: > Three (or more) things (the pursuers), starting (in the > corners) pursue another thing (the pursued), starting (in the > center). For each step the pursued takes (along a predefined > path, a random path, away from closest chaser, away from all > the pursuers), the pursuers take a step towards the pursued. > As the things move, they drag a pen that shows the path they > have taken. > > He also proposed implementing "Conway's Life". > > Paul Coates suggested a novel way of implementing bubblesort: > When introducing bubblesort my students and I get lots of fun > doing it with people. Students line up and each one asks the > person in front what their name is. if you are Adamatzy and > the guy in front is Zogolovich then you swap and so on. You > could set this up with turtles using who numbers [or give the > turtles names - NG]. Line the turtles up, ask them who the > guy in front is etc. > > Jim Lyons suggested: Make a binary counter by using a turtle > for each bit. > Its label is its state, 1 or 0. (Hint: Arrange the turtles > from right to left so that each turtle's who number is also > its power of two in the > counter.) Write a command that increments the counter by one. > > Steve Railsback mentioned the sequence of 16 template models > he and colleagues devised that could be used as beginners' exercises: > http://www.swarm.org/wiki/Software_templates > <http://www.swarm.org/wiki/Software_templates> > > Thank you all for your suggestions and interest. Here are > some more suggestions that I have listed on a student handout: > > Cars at a road intersection > What happens as the number of cars trying to cross an > intersection increases? Develop a model in which cars/car > drivers are agents and drivers attempt to cross the > intersection safely, without crashing into the cars coming > from the other roads that meet at the intersection. > > Patient choice > An earlier activity introduced a system dynamics model of > hospital choice (this modelled two hospitals, each with a > maximum capacity, a waiting list, and a reputation. Patients > selected which hospital to attend depending on its reputation > and the length of its waiting list. > Over-subscribed hospitals gradually lost their reputation as > their quality of care declined). Build the equivalent > agent-based model and see whether this is to be preferred > over the system dynamics version. > > Party voting > Assume that political parties? manifestos can be arranged > along a single line, from left to right, that voters? > preferences are randomly distributed from left to right, and > that voters vote for the party whose manifesto position is > closest to their own preference. Build a model to show that a > centrist party will win the election. Now complicate the > model with more than one dimension, parties that move their > position to maximise their chances of election, voters that > remember election pledges and so on (there is a large > literature in political science investigating models of this kind). > > Seating positions > In a typical lecture room, there are 5 rows of 6 seats. > Students enter the room before a lecture starts and select a > seat to occupy. > Through observation, introspection or in some other way, > devise a set of rules that students might be using to choose > where to sit and create a simulation in which the agents use > these rules to select a place in a virtual room. Compare the > pattern of occupied seats with a real lecture room. > > Markets > A market consists of some number of sellers and some buyers. > Sellers want to maximise the money they receive, and will not > sell if offered less than their ?reservation price?. However, > they want to sell all their goods if possible. Buyers want to > buy goods cheaply, and will not buy if the price is above > their reservation price. Model a market in which there are no > fixed prices, and the effective price depends on whether a > buyer can be found for that price. Show that the price of a > single type of good tends to converge to the ?market price?, > and that this depends on the demand (but not on the number of > buyers or sellers, if the numbers are large). Once you have > designed a market model such as this, there are lots of > interesting variations. For example, there may be information > costs involved in finding which of several sellers is the > cheapest. In such markets, not all sellers need to offer the > same price. > > > There are also two suggestions in my original post, below. > > Nigel > > On 7/4/07 23:06, "Nigel Gilbert" <n.gilbert at surrey.ac.uk > <mailto:n.gilbert%40surrey.ac.uk> > wrote: > > > I'm looking for ideas for programs that beginners to NetLogo (and to > > programming) could use as exercises to help them learn how to build > > NetLogo models. Beginners can learn a lot from looking at other > > people's programs, but to really gain confidence, they need to > > practice writing their own. Most of the models in the > Models Library > > and on the Community page are good for learning about physics or > > biology or whatever, but are too complicated for a real > beginner to re-implement for themselves. > > > > Good exercises for beginners would be ones for which: > > - it is easy to describe what the problem is or the model > is supposed > > to do; > > - specialist knowledge of a discipline is not needed to > understand the > > problem > > - a model can be programmed in less than one page (say, 40 lines of > > code as a maximum) > > - has some satisfyingly visual output > > > > Here's two suggestions. Do you have others to add? If so, > please post > > them (on or off list) and I'll summarise everything I get. > > > > 1. make a turtle trace out your initials 2. model the path > of a rope > > held at one end and moved with a sin wave at the other end > > > > Nigel > > > > > > __________________________________________________________ > > Professor Nigel Gilbert, Editor, Journal of Artificial > Societies and > > Social Simulation, <http://jasss.soc.surrey.ac.uk/ > > <http://jasss.soc.surrey.ac.uk/> > Centre for Research in Social > > Simulation (CRESS) Department of Sociology, University of > Surrey, Guildford, UK. > > Tel:+44 1483 689173 N.Gilbert at surrey.ac.uk > > <mailto:N.Gilbert%40surrey.ac.uk> <http://cress.soc.surrey.ac.uk/ > > <http://cress.soc.surrey.ac.uk/> > > > > > > > > > > > > > > > Yahoo! Groups Links > > > > > > > > __________________________________________________________ > Professor Nigel Gilbert, ScD, FREng, AcSS, Professor of > Sociology, University of Surrey, Guildford GU2 7XH, UK. +44 > (0)1483 689173 > > > > __._,_.___ > Messages in this topic > <http://groups.yahoo.com/group/netlogo-users/message/5977;_ylc zZ0lkAzYwNzAEc2VjA2Z0cgRzbGsDdnRwYwRzdGlt> ZQMxMTc3MjA0MzAxBHRwY0lkAzU5Nzc-> (0) Reply (via web post) > <http://groups.yahoo.com/group/netlogo-users/post;_ylc=X3oDMTJ wcW03cjZjBF9TAzk3MzU5NzE0BGdycElkAzQ4NzI4MjcEZ3Jwc3BJZAMxNzA1MDgyMTc4BG1zZ0lkAzY wNzAEc2VjA2Z0cgRzbGsDcnBseQRzdGltZQMxMTc3> MjA0MzAx?act=reply&messageNum=6070> | Start a new topic > <http://groups.yahoo.com/group/netlogo-users/post;_ylc=X3oDMTJ ldm41NWFvBF9TAzk3MzU5NzE0BGdycElkAzQ4NzI4MjcEZ3Jwc3BJZAMxNzA1MDgyMTc4BHNlYwNmdHI Ec2xrA250cGMEc3RpbWUDMTE3NzIwNDMwMQ--> > Messages > <http://groups.yahoo.com/group/netlogo-users/messages;_ylc=X3o DMTJlbGlkYjE2BF9TAzk3MzU5NzE0BGdycElkAzQ4NzI4MjcEZ3Jwc3BJZAMxNzA1MDgyMTc4BHNlYwN mdHIEc2xrA21zZ3MEc3RpbWUDMTE3NzIwNDMwMQ--> > | Files > <http://groups.yahoo.com/group/netlogo-users/files;_ylc=X3oDMT JmaHZwNG8yBF9TAzk3MzU5NzE0BGdycElkAzQ4NzI4MjcEZ3Jwc3BJZAMxNzA1MDgyMTc4BHNlYwNmdH IEc2xrA2ZpbGVzBHN0aW1lAzExNzcyMDQzMDE-> > | Photos > <http://groups.yahoo.com/group/netlogo-users/photos;_ylc=X3oDM TJlaWkzZWhzBF9TAzk3MzU5NzE0BGdycElkAzQ4NzI4MjcEZ3Jwc3BJZAMxNzA1MDgyMTc4BHNlYwNmd HIEc2xrA3Bob3QEc3RpbWUDMTE3NzIwNDMwMQ--> > | Polls > <http://groups.yahoo.com/group/netlogo-users/polls;_ylc=X3oDMT JmaDhncmxuBF9TAzk3MzU5NzE0BGdycElkAzQ4NzI4MjcEZ3Jwc3BJZAMxNzA1MDgyMTc4BHNlYwNmdH IEc2xrA3BvbGxzBHN0aW1lAzExNzcyMDQzMDE-> > Yahoo! Groups > <http://groups.yahoo.com/;_ylc=X3oDMTJkMDE0NnFhBF9TAzk3MzU5NzE 0BGdycElkAzQ4NzI4MjcEZ3Jwc3BJZAMxNzA1MDgyMTc4BHNlYwNmdHIEc2xrA2dmcARzdGltZQMxMTc 3MjA0MzAx> > Change settings via the Web > <http://groups.yahoo.com/group/netlogo-users/join;_ylc=X3oDMTJ mZm81aDN2BF9TAzk3MzU5NzE0BGdycElkAzQ4NzI4MjcEZ3Jwc3BJZAMxNzA1MDgyMTc4BHNlYwNmdHI Ec2xrA3N0bmdzBHN0aW1lAzExNzcyMDQzMDE-> > (Yahoo! ID required) Change settings via email: Switch > delivery to Daily Digest > <mailto:netlogo-users-digest at yahoogroups.com?subject=Email > Delivery: Digest> | Switch format to Traditional > <mailto:netlogo-users-traditional at yahoogroups.com?subject=Chan > ge Delivery Format: Traditional> Visit Your Group > <http://groups.yahoo.com/group/netlogo-users;_ylc=X3oDMTJkdHZh ZmZnBF9TAzk3MzU5NzE0BGdycElkAzQ4NzI4MjcEZ3Jwc3BJZAMxNzA1MDgyMTc4BHNlYwNmdHIEc2xr A2hwZgRzdGltZQMxMTc3MjA0MzAx> | Yahoo! > Groups Terms of Use <http://docs.yahoo.com/info/terms/> | > Unsubscribe > <mailto:netlogo-users-unsubscribe at yahoogroups.com?subject=> > Recent Activity > > * > 3 > New Members > <http://groups.yahoo.com/group/netlogo-users/members;_ylc=X3oD MTJmaDBjcmJnBF9TAzk3MzU5NzE0BGdycElkAzQ4NzI4MjcEZ3Jwc3BJZAMxNzA1MDgyMTc4BHNlYwN2 dGwEc2xrA3ZtYnJzBHN0aW1lAzExNzcyMDQzMDE-> > > Visit Your Group > <http://groups.yahoo.com/group/netlogo-users;_ylc=X3oDMTJlc25r MWxiBF9TAzk3MzU5NzE0BGdycElkAzQ4NzI4MjcEZ3Jwc3BJZAMxNzA1MDgyMTc4BHNlYwN2dGwEc2xr A3ZnaHAEc3RpbWUDMTE3NzIwNDMwMQ--> > SPONSORED LINKS > > * Teaching and learning > <http://groups.yahoo.com/gads;_ylc=X3oDMTJjMWxqazljBF9TAzk3MzU 5NzE0BF9wAzEEZ3JwSWQDNDg3MjgyNwRncnBzcElkAzE3MDUwODIxNzgEc2VjA3NsbW9kBHN0aW1lAzE xNzcyMDQzMDE-?> t=ms&k=Teaching+and+learning&w1=Teaching+and+learning&w2=Teach > ing+center&w3=Independent+research&w4=Online+teaching+and+lear > ning&w5=School+education&c=5&s=130&g=2&.sig=OzKrPnv-WrQgC3sBfSSSKg> > * Teaching center > <http://groups.yahoo.com/gads;_ylc=X3oDMTJjc25kN2Q1BF9TAzk3MzU 5NzE0BF9wAzIEZ3JwSWQDNDg3MjgyNwRncnBzcElkAzE3MDUwODIxNzgEc2VjA3NsbW9kBHN0aW1lAzE xNzcyMDQzMDE-?t=ms&k=Teaching+center&w1> =Teaching+and+learning&w2=Teaching+center&w3=Independent+resea > rch&w4=Online+teaching+and+learning&w5=School+education&c=5&s= > 130&g=2&.sig=LWUTZGQMu23UvjJ6X_Kixw> > * Independent research > <http://groups.yahoo.com/gads;_ylc=X3oDMTJjZWIzOHVuBF9TAzk3MzU 5NzE0BF9wAzMEZ3JwSWQDNDg3MjgyNwRncnBzcElkAzE3MDUwODIxNzgEc2VjA3NsbW9kBHN0aW1lAzE xNzcyMDQzMDE-?> t=ms&k=Independent+research&w1=Teaching+and+learning&w2=Teachi > ng+center&w3=Independent+research&w4=Online+teaching+and+learn > ing&w5=School+education&c=5&s=130&g=2&.sig=5hiOIRdfPkbWxGVPlBqPag> > * Online teaching and learning > <http://groups.yahoo.com/gads;_ylc=X3oDMTJjcHRkMW1rBF9TAzk3MzU 5NzE0BF9wAzQEZ3JwSWQDNDg3MjgyNwRncnBzcElkAzE3MDUwODIxNzgEc2VjA3NsbW9kBHN0aW1lAzE xNzcyMDQzMDE-?> t=ms&k=Online+teaching+and+learning&w1=Teaching+and+learning&w > 2=Teaching+center&w3=Independent+research&w4=Online+teaching+a > nd+learning&w5=School+education&c=5&s=130&g=2&.sig=_dxm4EHtgZQ > NAdwHcWn-ew> > * School education > <http://groups.yahoo.com/gads;_ylc=X3oDMTJjOXFmdTUzBF9TAzk3MzU 5NzE0BF9wAzUEZ3JwSWQDNDg3MjgyNwRncnBzcElkAzE3MDUwODIxNzgEc2VjA3NsbW9kBHN0aW1lAzE xNzcyMDQzMDE-?t=ms&k=School+education&w1> =Teaching+and+learning&w2=Teaching+center&w3=Independent+resea > rch&w4=Online+teaching+and+learning&w5=School+education&c=5&s= > 130&g=2&.sig=uAqWL0R7GBgVh1k6DNXWxA> > > Best Mascot > > Original or Cool > <http://us.ard.yahoo.com/SIG=12jc213u7/M=493064.10322712.10977 > 672.9706570/D=groups/S=1705082178:NC/Y=YAHOO/EXP=1177211501/A= > 4438958/R=0/SIG=1117tavmg/*http://www.bix.com/contest/5443> > > Play the Bix.com > > faceoff to see! > > Yahoo! Mail > > Next gen email? > <http://us.ard.yahoo.com/SIG=12i0ptleg/M=493064.9803214.105102 > 08.8674578/D=groups/S=1705082178:NC/Y=YAHOO/EXP=1177211501/A=3 > 848568/R=0/SIG=12jllrvsk/*http://us.rd.yahoo.com/evt=42409/*ht > tp://advision.webevents.yahoo.com/handraisers> > > Try the all-new > > Yahoo! Mail Beta. > > Y! GeoCities > > Share More > <http://us.ard.yahoo.com/SIG=12i6n428p/M=493064.9803219.105102 > 12.8674578/D=groups/S=1705082178:NC/Y=YAHOO/EXP=1177211501/A=3 > 848542/R=0/SIG=12ban20bv/*http://us.rd.yahoo.com/evt=42416/*ht > tp://geocities.yahoo.com/ps/y360/?v=f> > > Create a blog, web > > site, and more. > > . > > <http://geo.yahoo.com/serv?s=97359714/grpId=4872827/grpspId=17 > 05082178/msgId=6070/stime=1177204301/nc1=4438958/nc2=3848568/n > c3=3848542> > __,_._,___ > |
Stephen Guerin wrote:
> Nigel Gilbert posted this summary of exercises for ABM students on the > NetLogo > list. Some good ideas. ... > > Paul Coates suggested a novel way of implementing bubblesort: > > When introducing bubblesort my students and I get lots of fun > > doing it with people. Students line up and each one asks the > > person in front what their name is. if you are Adamatzy and > > the guy in front is Zogolovich then you swap and so on. You > > could set this up with turtles using who numbers [or give the > > turtles names - NG]. Line the turtles up, ask them who the > > guy in front is etc. I just got around to reading this email. Ray's Random Connections worked again - as I read the paragraph, above, I thought of the story I heard on Living On Earth this morning - http://www.greatturtlerace.com/. -- Ray Parks rcparks at sandia.gov IDART Project Lead Voice:505-844-4024 IORTA Department Mobile:505-238-9359 http://www.sandia.gov/scada Fax:505-844-9641 http://www.sandia.gov/idart Pager:800-690-5288 |
Free forum by Nabble | Edit this page |