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]

Did anyone else hate Lae'zel as much as I did? Did anyone else hate Lae'zel as much as I did?

Posted On: November 19, 2023
I mean come on, she literally was just an asshole from the moment you meet her. She constantly talks down to literally everyone, acts like she is god's gift to the world, and talks like everyone a...[More]


What is the best gear to wear when fighting Ranrok in Hogwarts? What is the best gear to wear when fighting Ranrok in Hogwarts?

Posted On: April 12, 2023
Help.  What gear should I use? Question from user Legofan990 at HogwartsLegacyGaming at reddit.com. Answer: Honestly, its a really easy fight so I wouldnt worry about gear too much. J...[More]


In Hogwarts Legacy, Am I the only one who prefers the switch Hagrid? In Hogwarts Legacy, Am I the only one who prefers the switch Hagrid?

Posted On: April 19, 2023
Question from user supxleon123 at HogwartsLegacyGaming at reddit.com. Answer: We’re getting a PS5 hagrid? Answer from user UglyPuta- at HogwartsLegacyGaming at reddit.com....[More]


Will i enjoy this game if i really like Jedi Fallen Order? Will i enjoy this game if i really like Jedi Fallen Order?

Posted On: September 2, 2023
Ive been wanting HL fo ages and its on sale and i was wondering if id enjoy it if it is similar to jedi fallen order, like combat thats not super hardcore along with exploration, replay ability and a ...[More]


Where is the rifle in Vault 15? Where is the rifle in Vault 15?

Posted On: April 29, 2024
I am reliving old RPG glory in Fallout 1. I am currently in Vault 15 and I remember that you can find the Hunting Rifle somewhere in the bathroom on the 2nd level. I checked all the bathrooms but can'...[More]


Is unbeatable game state possible? Is unbeatable game state possible?

Posted On: September 3, 2023
I managed to get through the first days at relative ease. After several attempts, I can't earn enough money on the day I'm at to feed and medicate my family.  Is a stalemate situation ...[More]


Why do Pokemon sometimes have dark stripes in Pokemon Go? Why do Pokemon sometimes have dark stripes in Pokemon Go?

Posted On: February 5, 2023
Occasionally I'll face a Charizard or Venusaur in GBL that has dark striping like this:.How do they get those markings, or what is the significance of them?Question from user Lysander at gaming.stacke...[More]


What weapons do you associate with certain companions? What weapons do you associate with certain companions?

Posted On: March 17, 2026
So recently I googled "Lae'zel sword" and found two specific greatswords pop up, the soulbreaker sword and the silver sword of the astral plane. Personally, I associate Lae'zel with soulbreaker more, ...[More]


Mass Effect 3, Is there nothing to scan for in the Ninmah Cluster? Mass Effect 3, Is there nothing to scan for in the Ninmah Cluster?

Posted On: May 21, 2023
I have had access to the Ninmah Cluster for a while now after doing some mission there. I have been around scanning a couple of times now between mission with out any luck. For all other areas where I...[More]


Miraak is stealing all my dragon souls Miraak is stealing all my dragon souls

Posted On: January 15, 2023
After reading the book Waking Dreams and seeing Miraak, I couldn't absorb a dragon's soul. I killed more than 10 dragons and Miraak took all the souls. Is this supposed to happen? Question ...[More]