alice-teacher Aik

Vanderhyde, James vanderhyde at sxu.edu
Tue Mar 12 12:36:52 EDT 2019


Don, thanks for checking. You’re right; it’s easy to set up with a do-together. The while loop does sort of solve the problem, but while loops are not one of my learning goals for this class, and neither is Zeno’s paradox!

James
—
James Vanderhyde
Assistant Professor and Department Chair, Computer Science
Saint Xavier University
3700 W. 103rd St.
Chicago, IL 60655
773-298-3454
[cid:35967E2D-3CD7-4736-B548-1ACD7307A0AD at SXU.local]
On Mar 5, 2019, at 6:13 AM, Don Slater <don at alice.org<mailto:don at alice.org>> wrote:

James,
Your world is interesting… When I built a project myself, before looking at your world, I did it with a do-together and the two moves (bunny and chicken) inside the block. Both moves had the same duration. When I ran it the chicken moved, and the bunny moved along an arc, chasing the chicken, what I assume to be the original distance of the chicken to the bunny. This made some sense to me, as the calculation of the distance in the function would be a one-time occurrence, but the concurrent moves would force some adjustment of the bunny’s path.

However, still in my world, when I adjusted the duration of the chicken move in the do-together, I saw exactly the same behavior as you illustrate in your example. An event, as I am sure you know, executes concurrently with whatever is in my first method; so our projects are very similar. The different duration periods certainly affects the behavior, but I will leave it to the support team to figure that out / explain it.

As a work around I did find that if I modified your bunny move event by adding a

while (distance to bunny > 0.01)
bunny move (bunny distance to chicken) toward chicken (style abruptly)

I got the behavior that I think you were looking for…

Thank you for pointing this out.

All the best,
Don Slater

Alice Project

On Mar 4, 2019, at 1:26 PM, Vanderhyde, James <vanderhyde at sxu.edu<mailto:vanderhyde at sxu.edu>> wrote:

I am experiencing what I think is a bug in Alice 2 in the “move toward” instruction. See attachment. Here is the code:
  bunny move ( bunny distance to chicken ) toward target = chicken
This should move the bunny right onto the chicken, and it does, unless the chicken is moving. When the chicken is moving, even if it’s moving very slowly, the bunny does not move far enough. It should do the same thing as “bunny move to chicken,” but it doesn’t.

I am guessing there is special logic in the implementation of “move toward” for when the target object is moving, and there is an error in the calculation in that case. I am guessing maybe a unit vector is used instead of a vector scaled by the speed.

James
—
James Vanderhyde
Assistant Professor and Department Chair, Computer Science
Saint Xavier University
3700 W. 103rd St.
Chicago, IL 60655
773-298-3454
<bunny move toward chicken.a2w>_______________________________________________
alice-teachers mailing list
alice-teachers at lists.andrew.cmu.edu<mailto:alice-teachers at lists.andrew.cmu.edu>
To change settings or unsubscribe visit:
https://lists.andrew.cmu.edu/mailman/listinfo/alice-teachers

_______________________________________________
alice-teachers mailing list
alice-teachers at lists.andrew.cmu.edu<mailto:alice-teachers at lists.andrew.cmu.edu>
To change settings or unsubscribe visit:
https://lists.andrew.cmu.edu/mailman/listinfo/alice-teachers

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.andrew.cmu.edu/pipermail/alice-teachers/attachments/20190312/dbc0899a/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen Shot 2019-03-12 at 11.36.12 AM.png
Type: image/png
Size: 146316 bytes
Desc: Screen Shot 2019-03-12 at 11.36.12 AM.png
URL: <http://lists.andrew.cmu.edu/pipermail/alice-teachers/attachments/20190312/dbc0899a/attachment-0001.png>


More information about the alice-teachers mailing list