/-/S'pht-Translator-Active/-/


Random Placement Test
Posted By: treellamaDate: 7/12/13 7:26 a.m.

I made a simple level in Pfhorte, with rooms to the north, east, south, and west. I put a BoB in each room, and a player in the middle. Next I set the initial count for BoBs to 1. Finally, I ran each test 50 times in both Marathon and Aleph One--the limit of my patience.

An ideal random placement algorithm would spawn a BoB in each room 25% of the time. As anybody who's played House of Monkey (or just read the source code) knows, Aleph One's (Marathon 2's / Marathon Infinity's) placement algorithm is not ideal. The way it picks a random location is by picking a random saved object of any type; then if that object is not the right type, it just increments until it finds one.

In the case of my test map, the saved objects are:

player
north bob
east bob
south bob
west bob

Because of this, I expect a 40% chance of bob appearing in the north room (since if the game chooses 0 or 1 for the random number, it will end up on 1), and a 20% chance of bobs appearing in the other rooms.

What I get from Aleph One is:
N: 46%
E: 22%
S: 16%
W: 16%

Close enough, given how bad the actual random number generator already is.

I repeated the same test in Marathon:
N: 36%
E: 26%
S: 26%
W: 12%

To really verify that Marathon placement really does work that way, I put a bunch of pistol ammo in the map. Now the items are:

player
north bob
east bob
south bob
west bob
ammo x 12

I expect the chances of BoB to be in the north room are 14/17, 82%! And only a 6% chance for BoB to appear in any of the other rooms.

Results from Aleph One:
N: 80%
E: 10%
S: 4%
W: 6%

Marathon:
N: 82%
E: 2%
S: 10%
W: 6%

It's clear that Marathon and Aleph One are using the same (awful) random placement algorithm.

Can someone think of something else that might be at work to make Hamish think something is wrong?

[ Post a Reply | Message Index | Read Prev Msg | Read Next Msg ]
Pre-2004 Posts

Replies:

Random Placement Testtreellama 7/12/13 7:26 a.m.
     Re: Random Placement Testtreellama 7/12/13 7:27 a.m.
     Re: Random Placement TestGodot 7/12/13 8:44 a.m.
           Re: Random Placement Testtreellama 7/12/13 12:07 p.m.
                 Re: Random Placement Testpoena.dare 7/12/13 7:36 p.m.
                       W T 1111 *NM*treellama 7/13/13 2:28 a.m.
                 Re: Random Placement TestGodot 7/13/13 3:05 a.m.
                       Re: Random Placement Testtreellama 7/13/13 3:46 a.m.

[ Post a Reply | Message Index | Read Prev Msg | Read Next Msg ]
Pre-2004 Posts

 

 

Your Name:
Your E-Mail Address:
Subject:
Message:

If you'd like to include a link to another page with your message,
please provide both the URL address and the title of the page:

Optional Link URL:
Optional Link Title:

If necessary, enter your password below:

Password:

 

 

Problems? Suggestions? Comments? Email maintainer@bungie.org

Marathon's Story Forum is maintained with WebBBS 5.12.