Is Angry Birds deterministic?

[BACK]
Is Angry Birds deterministic?
Posted On: December 21, 2022

While trying to get 3 stars on the more complex levels (the ones with a lot of destructible entities) I noticed that even after playing the same level over 50 times, doing always the same thing, I've never seen the same final result. Something always goes differently.


Does the same input always result in the same output, or is there a random factor in there?


Question from user Andreas Bonini at gaming.stackexchange.com.


Answer:

The algorithm is deterministic, but it's arguable that the overall result of launching a bird is effectively non-deterministic because it relies on (extraordinarily sensitive) user input.


To test the algorithm and the effect user input has on it, I used the following procedure:.


Load the Google Chrome version of Angry Birds.


Load level 1-1.


Pull the mouse back to a specific X-Y coordinate. (This was past the point of "full draw" for the bird.).


Release the bird, and wait for the game to reach a steady state.


To measure my X-Y coordinate, I opened a background Chrome window, and navigated it to this page. I aligned the two windows so that I could see the X and Y positions of the mouse while still able to cause something to happen when I released the bird. I aligned my mouse cursor with the lower left hand corner of the box around these two numbers, and then released. I noted the position of my mouse cursor then (as the display only updates when the mouse is not released and the cursor is over that window) and then noted the resulting score in Angry Birds. If you're having issues with exact mouse positioning, you might try an accessibility option offered by your OS, for instance, Mouse Keys on Windows.


I got the same score, so long as my cursor was in the exact same spot as it was on previous iterations.


Prior to coming up with an enhanced test rig that allowed me to measure my cursor's position to the pixel, I ran this experiment about 10 times, using a reference point in the background image of the game. I got scores by firing the first bird that varied between 8,000 and 11,000 points. Using the enhanced testing strategy, if I was off by a single pixel, I could expect score differences of anywhere between 150 and 500 points. .


I will note that the cursor was beyond the edge of the game area, outside the browser window, far beyond the maximum distance the bird can be drawn back, and I still noticed differences when moving my cursor even a single pixel. .


Further, I took screencaps for an extreme case where my cursor was on a different monitor than the game window, and ran several iterations where I kept my cursor in the same location, or moved it slightly. By my calculations (based on measuring distance from screencaps) the game was able to create a different result (score 32960 vs 31520) based on a one pixel difference in height (544 vs 545 pixels) over a distance of approximately 1,284 pixels of width. This works out to be an angular difference of 0.03 degrees.


I'd say that for any practical purposes, you can expect to employ the same general strategy on the same level repeatedly and expect wildly varying results. The level of sensitivity in the controls is so extreme that there's no practical way to get it to do the same thing twice. This is exacerbated by the fact that if you're playing on a touchscreen, it would be extraordinarily difficult to reproduce the same movements down to the individual pixel.


Answer from user agent86 at gaming.stackexchange.com.



[BACK]
Is Angry Birds deterministic?
Posted On: December 21, 2022

While trying to get 3 stars on the more complex levels (the ones with a lot of destructible entities) I noticed that even after playing the same level over 50 times, doing always the same thing, I've never seen the same final result. Something always goes differently.


Does the same input always result in the same output, or is there a random factor in there?


Question from user Andreas Bonini at gaming.stackexchange.com.


Answer:

The algorithm is deterministic, but it's arguable that the overall result of launching a bird is effectively non-deterministic because it relies on (extraordinarily sensitive) user input.


To test the algorithm and the effect user input has on it, I used the following procedure:.


Load the Google Chrome version of Angry Birds.


Load level 1-1.


Pull the mouse back to a specific X-Y coordinate. (This was past the point of "full draw" for the bird.).


Release the bird, and wait for the game to reach a steady state.


To measure my X-Y coordinate, I opened a background Chrome window, and navigated it to this page. I aligned the two windows so that I could see the X and Y positions of the mouse while still able to cause something to happen when I released the bird. I aligned my mouse cursor with the lower left hand corner of the box around these two numbers, and then released. I noted the position of my mouse cursor then (as the display only updates when the mouse is not released and the cursor is over that window) and then noted the resulting score in Angry Birds. If you're having issues with exact mouse positioning, you might try an accessibility option offered by your OS, for instance, Mouse Keys on Windows.


I got the same score, so long as my cursor was in the exact same spot as it was on previous iterations.


Prior to coming up with an enhanced test rig that allowed me to measure my cursor's position to the pixel, I ran this experiment about 10 times, using a reference point in the background image of the game. I got scores by firing the first bird that varied between 8,000 and 11,000 points. Using the enhanced testing strategy, if I was off by a single pixel, I could expect score differences of anywhere between 150 and 500 points. .


I will note that the cursor was beyond the edge of the game area, outside the browser window, far beyond the maximum distance the bird can be drawn back, and I still noticed differences when moving my cursor even a single pixel. .


Further, I took screencaps for an extreme case where my cursor was on a different monitor than the game window, and ran several iterations where I kept my cursor in the same location, or moved it slightly. By my calculations (based on measuring distance from screencaps) the game was able to create a different result (score 32960 vs 31520) based on a one pixel difference in height (544 vs 545 pixels) over a distance of approximately 1,284 pixels of width. This works out to be an angular difference of 0.03 degrees.


I'd say that for any practical purposes, you can expect to employ the same general strategy on the same level repeatedly and expect wildly varying results. The level of sensitivity in the controls is so extreme that there's no practical way to get it to do the same thing twice. This is exacerbated by the fact that if you're playing on a touchscreen, it would be extraordinarily difficult to reproduce the same movements down to the individual pixel.


Answer from user agent86 at gaming.stackexchange.com.



[BACK]

Can I alter the biome of an area? Can I alter the biome of an area?

Posted On: January 12, 2023
In part 3 of my adventures, I would like to find out if there is a way to change biomes. In part 2, fredley said that it is possible to move terrain from one world to another, but the biomes wouldn...[More]


Does a bag carried out to the escape count as a secured bag? Does a bag carried out to the escape count as a secured bag?

Posted On: September 21, 2023
If I carry a bag out to the escape, rather than securing it in a helicopter or what have you (depending on the heist), does that bag count as a bag stolen at the end? Or do I need to throw the loot in...[More]


Is there a way to get out of the LAN mode in single player Minecraft? Is there a way to get out of the LAN mode in single player Minecraft?

Posted On: May 19, 2023
I am trying to keep the commands off for my video's and I accidentally started LAN mode in single player and I'm not sure how to set it back to normal if it's possible. Question from us...[More]


Can you rename your ship? Can you rename your ship?

Posted On: March 18, 2024
After completing the tutorial in Helldivers 2, you are asked to name your ship. Is it possible to rename your ship later on?Question from user Stevoisiak at gaming.stackexchange.com.Answer:You can ren...[More]


How many chapters are in Nier Reincarnation? How many chapters are in Nier Reincarnation?

Posted On: April 2, 2024
How many story chapters are in Nier Reincarnation? The game just released its final chapter. I just finished chapter 10 and want to know how many chapters I have left to complete before the game shuts...[More]


Hogwarts Legacy: whats this symbol next to my little dude mean? Hogwarts Legacy: whats this symbol next to my little dude mean?

Posted On: March 10, 2023
Question from user Ocasiohgodno at HogwartsLegacyGaming at reddit.com. Answer: It means it has a rare coloration. I don’t know the official term, but people have taken to calling them &ldq...[More]


Using bikes over karts in time trials in Mario Kart 8 Deluxe Using bikes over karts in time trials in Mario Kart 8 Deluxe

Posted On: April 27, 2023
I realized I never beaten staff times on MK8 and I'd like to give them a try. So, I watched several MK8 time trials on Youtube, and I noticed that bikes are often used. Is there a real advantag...[More]


In Zelda TOTK, Is it possible to save scum the "Cash In on Ripened Flint" quest? In Zelda TOTK, Is it possible to save scum the "Cash In on Ripened Flint" quest?

Posted On: May 23, 2023
In the Cash In on Ripened Flint side quest Gomo a Gordon in Bedrock Bistro offers 1,000 rupees for a piece of ripened flint. Unfortunately he has to eat (consume) flint to determine if it is of the ri...[More]


Cat Challenge in Hogwarts Legacy Cat Challenge in Hogwarts Legacy

Posted On: June 25, 2023
I wish there was a challenge where you could go around and pet all the cats in the game. Do you pet the cats or run by them? Question from user oogieboujie at HogwartsLegacyGaming at reddit. Ans...[More]


What is CP in PokemonGo? What is CP in PokemonGo?

Posted On: April 24, 2023
Pokémon have a statistic called CP. What does it do, and why is it relevant? Is it a substitute for the nonexistent levels and statistics, or is it something completely different? Questio...[More]