introduction to algorithms using netlogo. what’s an algorithm definitions of algorithm on the web:...
TRANSCRIPT
Introduction to Algorithms using Netlogo
What’s an Algorithm
• Definitions of Algorithm on the Web:– A procedure or formula for solving a problem.
www.cctvconsult.com/glossary.htm– A set of instructions or procedures for solving a
problem. www.davcomuk.co.uk/files/tech/glossary.htm
– An unambiguous formula or set of rules for solving a problem in a finite number of steps. Algorithms for encryption are usually called Ciphers. www.modssl.org/docs/2.3/ssl_glossary.html
– is a procedure or formula for solving problems www.stallion.com/html/support/glossary.html
Drawing in Netlogo
Start Netlogo (under CSCI programs) and resize the display to make the turtle easier to see
Click here
Use the command center to create a turtle
First define its shape
Next create one turtle
Now give commands to the turtle
Set to T for turtle
Give the command pd for pen down
Begin to draw a box using the commands fd
(forward) and lt (left turn)
Make your algorithm into a procedure
Commands to create the turtlein a procedurecalled setup
Commands givento the turtle in a procedure calledgo
Create 2 buttons to run your proceduresUse the button icon on the interface toolbar.
Runs the setup procedure
Try out your new buttons
Less typing?