Difference between revisions of "How searching works"

From The Shartak Wiki
Jump to navigationJump to search
Line 5: Line 5:
 
{| style="width:100%;margin-bottom:10px;padding:6px;border:1px solid #AAAAAA;background:#eee2e2;-moz-border-radius:1em;"
 
{| style="width:100%;margin-bottom:10px;padding:6px;border:1px solid #AAAAAA;background:#eee2e2;-moz-border-radius:1em;"
 
| '''Guide to searching'''
 
| '''Guide to searching'''
* If you'd like to look at or contribute to the experimental data, see [[search odds condensed]]
+
* If you'd like to contribute to the experimental data, see [[search odds condensed]] or [[search odds]]
* If you'd like to learn about or discuss the results, see [[search results]]
+
* If you'd like to view the summarized results, see [[search odds results]]
 +
* If you'd like to learn about or discuss results, see [[search odds discussion]]
 
* If you'd like to learn about or discuss the underlying assumptions about game mechanics, see [[how searching works]]
 
* If you'd like to learn about or discuss the underlying assumptions about game mechanics, see [[how searching works]]
 
* If you'd like to learn about or discuss statistical techniques being used to analyze data, see [[statistical analysis]]
 
* If you'd like to learn about or discuss statistical techniques being used to analyze data, see [[statistical analysis]]

Revision as of 07:35, 2 June 2006

Guide to searching

How the Game determines what Item(s) you Find

The process of finding items through searching is currently a black box area of code. Players click on the search button, and occasionally find items. Some of these outcomes are logged on the search odds pages (see search odds condensed). There are several reasonable methods that the game might be using to generate search results. Unless Simon tells us the answer or someone reverse-engineers the code, we are unlikely to know for certain which of these search models is actually correct.

Two-Stage Implementation

1. First, the game checks whether you have found something or not. Each location has a certain chance of finding something. This chance is (sometimes or always) modified by scavenging, might also be modified by jungle density, character class, or current inventory. For a typical character, the chance of finding something is either:

(A) a simple fraction of the form p/q, where p=1 and q=3-10 are likely candidates, or
(B) a multiple of 5% - as per (A) but with q=20 (and typically p=1-8).

2. If the search is successful, the game decides what item you have found. The item is chosen by one of the following methods:

(A) each item (in a terrain-specific list) is equally likely.
(B) some items are weighted with greater likelihood, but all items occur with a likelihood that is an integer multiple of the rarest item. Equivalently, the game generates a random number from 1 to n, and each item is assigned to one or more distinct numbers. (The denominator n is relatively small, perhaps less than 20.)
(C) as per (B), but rarest item does not have probability 1/n. Each item appears with probability k/n (where n is fixed by location but k depends upon the individual item). For example, a location might yield 4/7 pieces of driftwood and 3/7 sharpening stones.
(D) each item's likelihood is a multiple of 5% -- this is as per (C), but n=20 in all locations.

In all of these cases, the probability of finding a particular item is given by (p/q)*(k/n), where p, q, and n only depend on class and location, and k also depends upon the item. By hypothesizing a particular search methodology, we simply turn our suspicions toward limited ranges of p, q, k, and n.

Shartak Example: With medicine and herbal huts, it appears that the chance of finding an item is 33.3% – corresponding to 1A with p/q = 1/3. For characters without Scavenging, we have 213 finds in 616 in Medical Huts, and 94 finds in 276 in Herbal Huts. That data also supports 35% search odds (1D), but there is no reason not to work with a simpler 1-in-3 hypothesis.

One-Stage Implementation

If the game uses a one-stage implementation for determining search outcomes, it uses method 2B or 2C, but the outcome "Nothing" is also treated like another item (with the heaviest weighting). For example, a location might yield 3/11 driftwood, 2/11 sharpening stones, and 6/11 nothing. The one-stage implementation is modeled under the above two-stage process by using p/q=1. However, it is mentioned as a separate category because it results in larger messier values for k and n (such as n=300).

Irreducible Implementation

It is also possible that the probabilities of particular items are essentially arbitrary – not corresponding to any simple fractions. This might occur if the item find rates are dynamic (changed by the code in response to in-game measures) or pseudo-dynamic (tweaked an a non-integer post-hoc fashion by Simon in response to in-game measures). For example, a location might have roughly 0.230614 chance of driftwood. In this case, experimental find probabilities determined straight up from raw data are the most accurate treatment available. However, note that even in this worst case, simplifying assumptions (like claiming a 1-in-4 find rate) might make gameplay easier without sacrificing too much accuracy.

Simplifying Assumptions, and Discoveries

Here are some current assumptions that will make analyzing the data much easier. These assumptions are based on some a priori common sense expectations about item find rates. We can analyze whether each of these assumptions are supported by the data. Currently, there is no counterevidence against these assumptions.

  1. Analogous classes (e.g. Native Warrior and Outsider Soldier) are treated identically.
  2. Analogous locations (e.g. York, Durham, and Derby Medical Huts) are treated identically.
  3. On any successful search, the item result (Stage 2) is independent of character class and scavenging. In other words, each location has a item profile. Scavenging only affects the overall odds of success, but retains the same item profile.
  4. Scavenging increases find rates by a blanket amount independent of terrain. Although it might only work in certain locations, it has the same effect on all locations where it works – e.g. 50% increase in the chance of finding something.
  5. Jungle densities do not affect the item result (Stage 2). Again, the density might change the overall odds of success, but does not change the underlying item profile.

Here are some assumptions that have not been tested.

  1. We assume that current inventory does not affect search odds.
  2. We assume that presence and quantity of other characters in the same location does not affect search odds.
  3. We assume that current AP available and previous search history does not affect search odds.

In addition, here are some "discoveries" – hypotheses that are not necessarily common sense, but appear to be true based on the experimental data, and allow for further simplifications.

  1. Bananas and mangos are have identical probabilities in all locations. For example, if a mango is 3% likely in d4 Jungle, a banana is also 3% likely in d4 Jungle. A banana tree produces only bananas, and a mango tree produces only mangos, but with identical probabilities for identical character classes and jungle densities.
  2. "You find a broken knife, which you discard" appears to be a warning message that the location is worthless. So far, no item of value has been found in water, in gray mountain paths, and so on.

Here are some tentative hypotheses that might be counter to expectations.

  1. Ruins, jungle huts, caves, and all similarly exotic locations have so far shown extremely disappointing search outcomes. (I believe that eventually this will change without warning.)
  2. Town locations overgrown with jungle do not have the same search odds as jungle locations.
  3. Native-outsider "equivalent items" (such as the knife and the dagger) do not have identically paired find profiles.