Skip to content

BugHuntCamo: Make sure ticks advance before resetting timer#450

Open
LaCuneta wants to merge 1 commit into
mainfrom
fix-bug-hunt-timing
Open

BugHuntCamo: Make sure ticks advance before resetting timer#450
LaCuneta wants to merge 1 commit into
mainfrom
fix-bug-hunt-timing

Conversation

@LaCuneta
Copy link
Copy Markdown
Contributor

With changes to timer resolution due to various memory attacks, Bug Hunt Camouflage doesn't run as it once did in NetLogo Web. Because the timer returns 0 so often, not much happens when go is running. In desktop it runs many more cycles of go so you get more of the minimum timer bits coming out, so it's less noticeable.

The solution is just to track how far the ticks advanced and only reset if it went somewhere at all.

With changes to timer resolution due to various memory attacks, Bug Hunt
Camouflage doesn't run as it once did in NetLogo Web.  Because the timer
returns `0` so often, not much happens when `go` is running.  In desktop
it runs many more cycles of `go` so you get more of the minimum timer
bits coming out, so it's less noticeable.

The solution is just to track how far the ticks advanced and only reset
if it went somewhere at all.
@LaCuneta
Copy link
Copy Markdown
Contributor Author

LaCuneta commented May 22, 2026

You can see the current version and have it not update (unless your computer has a reaaaaally slow processor): https://netlogoweb.org/launch#https://netlogoweb.org/assets/modelslib/Sample%20Models/Biology/Evolution/Bug%20Hunt%20Camouflage.nlogox

And the updated version: https://raw.githubusercontent.com/NetLogo/models/e9abdfcef02907cf123b142e2c08b7c9d130ba99/Sample%20Models/Biology/Evolution/Bug%20Hunt%20Camouflage.nlogox

The "clear environment" button helps for testing. Also observer the ticks do not advance past 0 in the current version (or at least if it does it'll be extremely slowly).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant