Foldit Wiki

The Objectives dropdown, showing conditions and metrics.

Foldit puzzles may include special objectives which can modify the score.

These objectives require more calculations than the standard score. Players can temporarily turn off or disable these added calculations to speed up the game. All objectives must be enabled for a player's score to count, however.

There are two types of objectives, and they have slightly different rules.

Conditions, also known as filters, are one type of objective. Conditions can add a bonus or subtract a penalty. Many conditions also have a "show" option, which can highlight parts of the protein affected by a condition. Most conditions can be turned off temporarily. (Some "absolute conditions" are always on, and can't be turned off; this is discussed in more detail below).

Metrics are similar to conditions, and offer a bonus or penalty. Metrics can also be disabled temporarily.

Understanding how conditions and metrics work is a key to having an effective strategy in Foldit.

Manual control of conditions and metrics[]

Players can manually enable or disable conditions and metrics in the objectives dropdown, located in the top center of the Foldit window, under the score.

The objectives dropdown includes "Toggle All" and "Run All" buttons, which affect all conditions and objectives, with exceptions.

The exceptions are the absolute conditions, which make the score invalid for purposes of competition. Absolute conditions can't be disabled. Absolute conditions include having an open cutpoint, having a disabled condition or metric, or not having gained the necessary points to evolve a solution shared by another player.

It's also possible to enable or disable individual conditions and metrics using the check boxes in the objectives area.

Turning off objectives during hand folding generally improves performance, making for smoother gameplay.

Recipes can also disable conditions and metrics. As in hand folding, disabling objectives increases performance at the expense of making the score inaccurate. Objectives must be enabled to in order to get the correct score.

The functions recipes can use are discussed below.

Enabling and disabling all objectives[]

The function behavior.SetFiltersDisabled provides a similar function to the "toggle all" and "run all" buttons in the objectives dropdown.

The command:

behavior.SetFiltersDisabled ( true )

disables all metrics and non-absolute conditions. It's equivalent of clicking "toggle all" when at least some conditions or metrics are enabled. The objectives remain disabled until the user or a recipe enables them, or until Foldit is restarted.

Similarly, the command:

behavior.SetFiltersDisabled ( false )

enables all metrics and conditions. It's the equivalent of "toggle all" followed by "run all" in the objectives area, assuming at least one objective is disabled. When the command completes, all metrics and conditions are up to date, and reflect the most current score.

Enabling and disabling individual conditions[]

Functions in the "filter" namespace work with conditions. Some of the functions apply to all conditions, other apply to individual conditions. None of the functions work with absolute conditions.

The function filter.GetNames returns a table containing the names of all conditions. The names in the table can be used to call the functions that work with individual conditions. (The names of any absolute conditions are not included.)

The function filter.IsEnabled returns a true/false value, indicating whether a condition is enabled. The function filter.AreAllEnabled similarly returns true or false depending on whether all conditions are enabled.

The functions filter.EnableAll and filter.DisableAll enable or disable all objectives. Unlike behavior.SetFiltersDisabled, metrics are not included.

The functions filter.Enable and filter.Disable enable or disable a single named condition. Like the "all" versions, these functions do not work with metrics.

Scoring conditions[]

The function filter.GetBonusTotal returns the total bonus from all enabled conditions.

The function filter.HasBonus returns a true/false value indicating whether a condition can award a bonus. For conditions where filter.HasBonus is true, filter.GetBonus returns the current bonus. The bonus is non-zero only if the condition is enabled.

Calling filter.GetBonus for a condition which doesn't reward a bonus causes a recipe error.

Conditions which don't award a bonus can be either satisfied or not satisfied. The function filter.ConditionSatisfied returns a true/false satisfaction indicator for a given condition.

In addition to using filter.GetBonus and filter.GetBonusTotal, many recipes may use an older technique to get the total bonus from conditions. The idea is to get the score with all conditions enabled, then get the score with conditions disabled. The difference in score is the total bonus.

Enabling and disabling metrics[]

Metrics work differently than conditions.

The function metric.GetNames returns a table containing the names of all metrics. It's similar to filter.GetNames.

For metrics, however, there are no enable/disable functions. Instead, the function behavior.SetFiltersDisabled must be used, which enables or disables all metrics and conditions at once.

Scoring metrics[]

The function metric.GetBonusTotal returns the score for all metrics.

The function metric.GetBonus returns the score for a single named metric.

Unlike filter.GetBonus and filter.GetBonusTotal, however, the results functions do not depend on the metrics being enabled. They cause the metric or metrics to be calculated, and return the value they would have if enabled. The enabled status of the metrics does not change.

The most important difference between metrics and conditions is how they effect the overall score. For conditions, the function current.GetEnergyScore returns a score which includes the bonus/penalty for all enabled conditions. The score from current.GetEnergyScore does not include the score from metrics, regardless whether they are enabled or disabled.

Recipes must use both current.GetEnergyScore and metric.GetBonusTotal to determine the correct overall score.

Comparison of functions[]

The table below compare the functions for conditions in the filter name space with the functions for metric in the metric namespace. The corresponding controls or displays in the objectives dropdown is also included in the "GUI" column. A value of "display" means the corresponding information appears on screen when the objectives dropdown is expanded.

The function behavior.SetFiltersDisabled is included for completeness. This function sets enabled or disabled status for all conditions and metrics.

purpose filter metric GUI
enable/disable all behavior.SetFiltersDisabled behavior.SetFiltersDisabled "toggle all", "run all" buttons
check all enabled filter.AreAllEnabled none display
satisfied filter.ConditionSatisfied none display
disable filter.Disable none "enabled" checkbox
disable all filter.DisableAll none "toggle all" button
ensable filter.Enable none "enabled" checkbox
enable all filter.EnableAll none "toggle all" button
get bonus filter.GetBonus metric.GetBonus display
get bonus total filter.GetBonusTotal metric.GetBonusTotal display
get disabled names filter.GetDisabledNames none display
get disabled names filter.GetDisabledNames none display
get enabled names filter.GetEnabledNames none display
get names filter.GetNames metric.GetNames display
has bonus filter.HasBonus none display
is enabled filter.IsEnabled none display

As the table shows, many of the functions in the filter namespace don't have an equivalent function in the metric namespace. There's no way to determine whether a metric is enabled, or to change it's enabled/disabled status. Also, a metric can only award a bonus, so there's no such thing as a metric that is simply satisfied or not.

The filter namespace seems to contain at least a couple of functions that are superfluous. The functions filter.GetEnabledNames and filter.GetDisabledNames can be easily duplicated by using filter.GetNames to get the names, followed by filter.IsEnabled for each name.