Configure custom aspect costs to optimize research solutions based on your available resources
The Research Bot calculates solution costs based on aspect costs. By default, primal aspects cost 1, and compound aspects cost the sum of their components. You can override these costs in config.toml to optimize solutions based on your available resources.
[aspect-costs]# Define custom aspect costs here# Research solutions are scored by the total cost of all aspects used in the solution.# By default, all the primal aspects cost 1, all other aspects cost the sum of their components# Example:# - aqua and terra are primal, so they cost 1 each# - victus = aqua + terra, so it costs 2# - herba = terra + victus, so it costs 3# You can override these defaults like this, one entry per line:instrumentum = 1machina = 1potentia = 2
The bot calculates aspect costs using an iterative algorithm:
Initialize primal aspects to cost 1 (or custom override)
Process compound aspects whose parent costs are known
Calculate cost as the sum of parent aspect costs
Repeat until all aspects have known costs
Apply overrides from config.toml
From src/utils/aspects.py:101-132:
# Compute aspect costs without recursion by caching the results in a dictionaryaspect_costs = {k.lower(): v for k, v in get_global_config().aspect_cost_overrides.items()}# Initialize primal aspects (aspects without parents) with cost 1for aspect, parents in aspect_parents.items(): if parents == (None, None) and aspect not in aspect_costs: aspect_costs[aspect] = 1# Aspects whose costs are not calculated yetremaining_aspects = set(aspect_parents.keys()) - set(aspect_costs.keys())# Iteratively compute costs for aspects whose parents' costs are knownwhile remaining_aspects: progress = False for aspect in list(remaining_aspects): parents = aspect_parents[aspect] # Check if all parents' costs are known if all(parent in aspect_costs for parent in parents if parent is not None): # Compute the aspect's cost as the sum of its parents' costs total_cost = sum( aspect_costs[parent] for parent in parents if parent is not None ) aspect_costs[aspect] = total_cost remaining_aspects.remove(aspect) progress = True
Custom cost overrides are applied before calculating compound aspect costs. If you set victus = 5, then herba (victus + terra) will default to cost 6.