ScratchData LogoScratchData
Back to gregatku's profile

Cat Duckling Race 2

GRgregatku•Created February 15, 2020
Cat Duckling Race 2
8
5
141 views
View on Scratch

Instructions

Cat Duckling Race 2 (with a very clever little Duckling) Click Green Flag to reset for a new Race. Use the Sliders to select # times faster the Cat runs (than the Duckling swims) & whether or not we have a Clever? (0 | 1) Duckling & if clever Duck Speed (1 - 3). Then click the Duckling to start the Race. This project supersedes my original Cat, Duckling Race project (which I have now unshared) and when Clever? is mode Off you actually simulate what that project was supposed to do, but that project didn't actually work any more, although I'm not sure why? This project now has the Slider Range for "# times faster Cat runs" set so you can pick values to the 2nd decimal place such as 3.14 for < Pi and 3.15 for > Pi. However, when Clever? mode is On, there were a few values that didn't behave as they should so to avoid them, your chosen value for "# times faster Cat runs" is rounded to the nearest 1/10th! It's a lazy fix I know, but in the original version your choices were limited to 3, 4 or 5 times faster so it's a big improvement, and it allows you to determine by experimentation what the value is where, despite the Duckling's clever mathematics, the Cat will beat it anyway?

Description

Created by @gregatku for use in Coding Classes for Kids Unlimited, for whom I work as a Coding teacher. This mathematical problem was originally proposed when I found it online, along the following lines: "A duckling, too young to fly, is swimming on a circular pond and wants to nibble on the grass at the pond's edge. A cat, who like most cats doesn't like to get into water is at the edge of the pond and wants to eat the duckling. The cat can run 4 times faster than the duckling can swim. Is it possible for the duckling to get to the grass before the cat gets to him?" If we turn Clever? mode Off we will see that if the cat runs 3.14 (or less) times as fast as the duckling can swim, the duckling gets the grass, but at 3.15 (or more) times the duckling's speed, the cat gets there first. That is because 3.14 is < Pi and 3.15 > Pi, and the Cat has Pi times further to travel. So if the Cat runs 3.15 or more times faster, which is > Pi, it's not possible for the Duckling to get the grass, right? Well that's true if the Duckling goes straight for it, but if we turn Clever? mode On, there's a sweet spot from a circle with radius (1 - Pi/4) * R = 0.2146 * 160 = 34.336 out to one of radius R/4 = 160/4 = 40 (R = Pond Radius namely 160 here), where if the Duckling swims around in a circle somewhere inside that sweet spot until the chasing Cat is as far away as possible, then if the Duckling makes a beeline for the grass, it will actually be able to get the grass as long as the Cat's speed is less than a "specific" times the Duckling's speed. That specific value is for you to determine. A good explanation of this strategy can be found here: https://www.youtube.com/watch?v=vF_-ob9vseM The only flaw with the video is that it's a mouse swimming on the pond not a duckling, with the plan to escape from the pond. But once it escapes the pond the cat will clearly chase it down and catch it now that it doesn't have the water to worry about. This little story regarding the duckling is much more plausible, even though the duckling is highly unlikely to be as clever a mathematician as we have made it. I hope you found this interesting. Regards Greg

Project Details

Project ID368435428
CreatedFebruary 15, 2020
Last ModifiedJanuary 22, 2024
SharedFebruary 15, 2020
Visibilityvisible
CommentsAllowed