skip to content

build and test a challenge solver with machine learning in a lab · lesson 7 of 7 · sources checked 2026-11-30

cost, provider policies, and the law

This lesson computes the effective cost of a lab solver, and puts the law and the policy of the model provider before the cost.

status of this lesson: from a public source

this page is not legal advice.

purpose

A solver that is cheap for each try can be expensive for each success. A person who designs or buys a challenge uses the same numbers from the other side, to set the effective cost of abuse.

objectives

  1. Calculate the effective cost for each success from the cost of one attempt and the success rate.
  2. Explain why a defense that lowers the success rate raises the cost with no hard block.
  3. Name the checks of the law and of the provider policy that come before the cost.
  4. Write a decision record for a solver: lab only, or do not build.

new terms

decision record
A short document that gives the context, the decision, the status, and all consequences of one design decision.

how it works

the cost for each success

The cost of one attempt is the symbol c. It holds all costs of one attempt, for example the model calls and the compute time. The success rate p is the share of attempts that get an accepted token.

The effective cost is the cost for each success: c divided by p. A low success rate multiplies the attempts.

example One attempt costs c, and the success rate in the lab is 0.3. The effective cost is c / 0.3, or about 3.33 c. At a success rate of 0.08, it is 12.5 c.

A model call can bill for each unit of input and output, for example for each short part of text. I give no amount. You put the price of your provider at the date into c. A full formula also adds the cost of retries. More detail is in The cost of an AI operator (not yet published).

the defender reads the same formula

A defense that lowers p raises the effective cost for the solver. The site does not have to give a hard block. For example, a change of the task lowers the success rate of a solver from 0.3 to 0.08. Then its cost for each success rises by a factor of about 3.75.

The designer of a challenge sets this cost against the value of the asset behind the gate. That is the price of abuse. More detail on that design is in Maintenance: rotation, solve-rate monitor, and the price of abuse (not yet published).

the law comes before the cost

In January 2021, the Federal Trade Commission (FTC) announced its first cases under the BOTS Act, a law of 2016 Federal Trade Commission, source 1. The FTC stated that the Act gives it authority for law enforcement action against such persons and companies:

  • They use bots or other means.
  • With them, they get around limits on online ticket purchases.

The FTC alleged that the defendants used automated software to buy tickets.

The case is a fact of record. It shows that a law can address software that gets around a limit of a site. It does not show if a law applies to your own work. A legal review in your country answers that question. More enforcement cases are on the reference pages.

the policy of the model provider

In this module, the model of the solver runs on a lab host. It meets only the tasks of your lab: your own generator and the benchmark that you host.

A solver that uses the model of a provider also depends on the usage policy of that provider. This is also true when the model runs on a lab host. Such a policy can refuse some uses, for example the automated use of a check that is for persons. It can also change at a date.

Thus you read the policy at the date of the work, and you record its version and its date.

An agent can meet a human-verification check while it works for a user. In my model, the agent then stops, or it gives control back to the user. It never gives a person a false reason to get help with the check.

the decision record

A decision record holds the answer of each check, in this order:

  1. The target class: your own lab generator, a public benchmark, or a site of a third party.
  2. The law: the result of a legal review.
  3. The provider policy: its version, its date, and its answer.
  4. The cost: c, the measured p, and the effective cost against your own limit.

A no at the law, the policy, or the cost ends the record with the decision "do not build". A legal review that is not clear counts as a no.

A site of a third party ends the record at step 1: no solver. The output is the declared path, or a stop.

On that path, a declared agent states who it is. A signed agent also signs its requests, so that the site can verify it. More detail is in Signed agents and declared bots (not yet published).

The chart in the section "Data" shows the effective cost for a grid of success rates.

the two sides

automation sidedetection side
The cost for each success is the cost of one attempt divided by the success rate. The law and the policy of the provider set a line before the cost does. For a site of a third party, the output is the declared path or a stop.A defense that lowers the success rate raises the cost with no hard block. The designer sets that cost against the value of the asset. A declared, signed agent is the clean path, and the site can verify it.

design decisions

optiongaincostwhen it is correct
Give the cost for each attemptIt is simple to compute.It hides the cost of the failed attempts.Never as the only number
Give the effective costIt shows the real cost of one success.It must have a measured success rate.For each decision on a solver
Put an amount in the codeThe output looks complete.The amount is old soon.Never: put the price of the date into c
Check the law and the policy firstNo work starts that is not permitted.One review before each new target classFor each solver plan
Lower the success rate at the gateIt raises the cost with no hard block.Real users can pay part of the cost.When the asset has a high value
Send automation to the declared pathThe site can verify the client.The client must declare itself and sign.For each site of a third party

diagram

the decision for a solver: target class, law, provider policy, then cost

The checks come in a fixed order. A site of a third party ends the plan at the first check.source: My model of the decision for a solver

code example

The example computes the effective cost and writes a decision for each record. It holds no price: the cost of one attempt is the unit c. The records are invented. The law and the policy fields come from a review, not from the code.

m48-x06-decision.tstypescript

A cost calculator and a decision record: the effective cost for each success, and the target, law, and policy checks as fields.

// A cost calculator and a decision record. It holds no price.
// The cost of one attempt is the unit c. Put in your own cost of the date.
type DecisionRecord = {
  target: "own lab generator" | "public benchmark" | "site of a third party";
  lawPermits: boolean | "not clear"; // from a legal review, not from this code
  providerPolicyPermits: boolean; // from the policy of the provider, with its date
  costOfOneAttempt: number; // in units of c
  successRate: number; // measured in the lab, from 0 to 1
  maxCostForEachSuccess: number; // in units of c, your own limit
};

function effectiveCost(c: number, p: number): number {
  if (p <= 0) return Infinity; // no success: no finite cost
  return c / p;
}

function decide(r: DecisionRecord): string {
  if (r.target === "site of a third party") return "no solver: declared path or stop";
  if (r.lawPermits !== true) return "do not build";
  if (!r.providerPolicyPermits) return "do not build";
  const e = effectiveCost(r.costOfOneAttempt, r.successRate);
  return e <= r.maxCostForEachSuccess ? "lab only: build and measure" : "do not build";
}

// INVENTED records for this example.
const RECORDS: DecisionRecord[] = [
  { target: "own lab generator", lawPermits: true, providerPolicyPermits: true, costOfOneAttempt: 1, successRate: 0.3, maxCostForEachSuccess: 5 },
  { target: "own lab generator", lawPermits: true, providerPolicyPermits: true, costOfOneAttempt: 1, successRate: 0.08, maxCostForEachSuccess: 5 },
  { target: "public benchmark", lawPermits: true, providerPolicyPermits: false, costOfOneAttempt: 1, successRate: 0.45, maxCostForEachSuccess: 5 },
  { target: "own lab generator", lawPermits: "not clear", providerPolicyPermits: true, costOfOneAttempt: 1, successRate: 0.6, maxCostForEachSuccess: 5 },
];

RECORDS.forEach((r, i) => {
  const e = effectiveCost(r.costOfOneAttempt, r.successRate);
  console.log(`record ${i + 1}: target ${r.target}; effective cost ${e.toFixed(2)} c; decision: ${decide(r)}`);
});

output

One line for each invented record: the target, the effective cost in units of c, and the decision.

record 1: target own lab generator; effective cost 3.33 c; decision: lab only: build and measure
record 2: target own lab generator; effective cost 12.50 c; decision: do not build
record 3: target public benchmark; effective cost 2.22 c; decision: do not build
record 4: target own lab generator; effective cost 1.67 c; decision: do not build

The output shows that a low cost for each success does not decide alone. Record 3 stops at the policy, and record 4 stops at the law.

data

effective cost for each success against the success rate

status of this figure: example

effective cost for each success against the success rate2010542.521.2515%10%20%25%40%50%80%100%times c, log

source: My model: effective cost for each success, c divided by p; date 2026-11-16; condition: The success rates are example inputs on a grid. The formula is c divided by p, with c = 1. Each computed value has at most 2 decimal places and is exact. This is a calculation.

data table
effective cost for each success against the success rate
success ratetimes c
5%20
10%10
20%5
25%4
40%2.5
50%2
80%1.25
100%1
The cost of one attempt is the unit c. The cost for each success is c divided by the success rate. The success rates are example inputs. The chart shows no amount.

failure modes

problemcausecorrection
The cost for each success is much higher than the plan.The plan used the cost for each attempt, and a low success rate multiplies the attempts.Give the effective cost: c divided by the measured success rate.
A cost record is wrong a few months later.The code holds an amount of one date.Hold no amount in the code. Put the price of the date into c.
A solver plan starts with the cost and ends at a legal question.The plan did not put the law and the policy first.Check the target class, the law, and the policy before the cost.
A solver works against a model whose policy changed.Nobody recorded the version and the date of the policy.Record the version and the date of the policy in the decision record.
An agent asks a person for help with a human-verification check.The agent has a goal and no rule for such a check.Stop the agent, or give control back to the user.
A defender adds a hard block where a cost is sufficient.The defender did not read the effective cost of the solver.Lower the success rate, and compare the cost with the price of abuse.

check questions

  1. One attempt costs 2 c, and the success rate is 0.25. What is the effective cost for each success?

    1. 0.5 c
    2. 8 c
    3. 2.25 c
    answer

    b. 8 c

    The effective cost is the cost of one attempt divided by the success rate: 2 c / 0.25 = 8 c.

  2. Explain why a defense that lowers the success rate of a solver raises its cost, also with no hard block.

    sample answer

    The effective cost is c divided by p. When the defense lowers p, the solver must make more attempts for each success, and each attempt costs c. Thus the cost for each success rises, and the site does not have to refuse the request.

  3. Name the checks that come before the cost in a decision record for a solver, in their order.

    sample answer

    First the target class, then the law, then the policy of the model provider with its version and date. The cost comes last.

  4. A plan for your own lab generator has a low effective cost, but the result of the legal review is not clear. What is the decision?

    1. Lab only, because the cost is low
    2. Build it, and lower the pace
    3. Do not build
    answer

    c. Do not build

    The record stops at the law check. A legal review that is not clear counts as a no, thus the decision is do not build, whatever the cost.

exercise

exercise Do this task on paper. The values are invented, and the cost is in units of c. Your own limit is 5 c for each success.

plantarget classlawprovider policycost of one attemptsuccess rate in the lab
1Own lab generatoryesyes2 c0.5
2Own lab generatoryesyes1 c0.15
3Own lab generatornot clearyes1 c0.7
  1. Calculate the effective cost of each plan.
  2. Follow the checks in the order of the decision record.
  3. Write the decision of each plan.
sample answer

The answer uses the three invented plans of the table.

Plan 1 has an effective cost of 2 c / 0.5 = 4 c. The target, the law, and the policy let it go on, and 4 c is in the limit of 5 c. The decision is lab only. Plan 2 has 1 c / 0.15, or about 6.67 c. That is over the limit, thus the decision is do not build.

Plan 3 has about 1.43 c, but the result of the legal review is not clear. The record ends at step 2, and the decision is do not build. The cost does not change this.

sources

  1. FTC brings first cases under the BOTS Act, Federal Trade Commission, regulator, read 2026-11-22
  2. My model of the effective cost, the order of the checks, and the decision record for a solver, 2026-11 (not public).