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]

Do the Illithid powers have any negative consequences? Do the Illithid powers have any negative consequences?

Posted On: August 11, 2023
Throughout the game, you can improve your hidden Illithid Powers skilltree by consuming more mindflayer worms. You also get [Illithid] skillchecks from time to time. However when you do either of t...[More]


Can guards find and arrest you in casing mode in a public area during a searching phase? Can guards find and arrest you in casing mode in a public area during a searching phase?

Posted On: September 10, 2023
In Payday 3, certain things can cause a Searching phase, such as a teammate being cuffed. During this phase, if you're caught in a private area in casing mode you will be cuffed instead of escorte...[More]


How can I record gameplay on a Mac? How can I record gameplay on a Mac?

Posted On: August 19, 2023
I can find plenty of information on recording programs for Windows, but information for OS X is much harder to find. What are the requirements and steps for recording gameplay on a Mac? Question fr...[More]


How can I use the trackpad for the sliders like the stars of the Vita version of f & f 2nd? How can I use the trackpad for the sliders like the stars of the Vita version of f & f 2nd?

Posted On: March 15, 2024
On the PlayStation Vita version of Hatsune Miku Project Diva f and f 2nd, you have stars, which you activate by moving your finger on the touch screen on any direction.Now that I have Hatsune Miku Pro...[More]


Does over-completing challenges earn extra XP in Mario Golf GBC? Does over-completing challenges earn extra XP in Mario Golf GBC?

Posted On: March 17, 2024
When doing side quests in Mario Golf for Game Boy Color, you are often given challenges to complete a task a certain number of times with a set number of attempts. You can keep playing after completin...[More]


What do Steam OS minimum system requirements guarantee in terms of playability? What do Steam OS minimum system requirements guarantee in terms of playability?

Posted On: September 25, 2023
I want to buy a game on Steam and my device meets the minimum system requirements. Am I guaranteed that the game will be playable? Question from user Francesco Iapicca at stackexchange. Answe...[More]


What does SP do? What does SP do?

Posted On: May 19, 2023
I recently decided to subscribe to Nintendo Switch Online, so I can play the NES games included in the service. When I launched the NES Nintendo Switch Online app, I noticed that some games were li...[More]


Statement from Larian Statement from Larian

Posted On: November 27, 2023
Regarding patch 4:. " In Patch 4 we introduced a fix that would prevent the Scrying Eyes in Moonrise Towers from immediately calling the guards on you when stealing, even if you were sneaking,...[More]


This guy is worse than I thought This guy is worse than I thought

Posted On: January 14, 2025
I finally managed to finish a honor mode, and I made a choice I never made before. .This time I actually agreed to sign Raphael's contract for the Orphic Hammer because I really wanted to beat the gam...[More]


BG3 is very fun, but exhausting to play. BG3 is very fun, but exhausting to play.

Posted On: November 11, 2023
OK, so I'm a bit late to the BG3 hype, but decided to give it a try and I'm really enjoying the game. My issue is: this game has insane amount of choices that aren't very clear and I en...[More]