curl --request POST \
--url https://softmax.com/api/observatory/v2/divisions/{division_id}/power-analysis \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"policy_ref": "<string>",
"elo_grid": [
123
],
"alpha": 0.05,
"power": 0.8,
"max_episodes": 1000
}
'import requests
url = "https://softmax.com/api/observatory/v2/divisions/{division_id}/power-analysis"
payload = {
"policy_ref": "<string>",
"elo_grid": [123],
"alpha": 0.05,
"power": 0.8,
"max_episodes": 1000
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
policy_ref: '<string>',
elo_grid: [123],
alpha: 0.05,
power: 0.8,
max_episodes: 1000
})
};
fetch('https://softmax.com/api/observatory/v2/divisions/{division_id}/power-analysis', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://softmax.com/api/observatory/v2/divisions/{division_id}/power-analysis",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'policy_ref' => '<string>',
'elo_grid' => [
123
],
'alpha' => 0.05,
'power' => 0.8,
'max_episodes' => 1000
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://softmax.com/api/observatory/v2/divisions/{division_id}/power-analysis"
payload := strings.NewReader("{\n \"policy_ref\": \"<string>\",\n \"elo_grid\": [\n 123\n ],\n \"alpha\": 0.05,\n \"power\": 0.8,\n \"max_episodes\": 1000\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://softmax.com/api/observatory/v2/divisions/{division_id}/power-analysis")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"policy_ref\": \"<string>\",\n \"elo_grid\": [\n 123\n ],\n \"alpha\": 0.05,\n \"power\": 0.8,\n \"max_episodes\": 1000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://softmax.com/api/observatory/v2/divisions/{division_id}/power-analysis")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"policy_ref\": \"<string>\",\n \"elo_grid\": [\n 123\n ],\n \"alpha\": 0.05,\n \"power\": 0.8,\n \"max_episodes\": 1000\n}"
response = http.request(request)
puts response.read_body{
"division_id": "<string>",
"anchor": {
"policy_ref": "<string>",
"policy_version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"note": "<string>",
"window": {
"rounds": 123,
"episodes_scanned": 123,
"oldest_round_at": "2023-11-07T05:31:56Z"
},
"mode_mix": {
"fractions": {},
"source": "campaign_board"
},
"modes": {},
"league_pooled": {},
"table": [
{
"elo": 123,
"per_mode_n_per_arm": {},
"blended_n_per_arm": 123,
"blended_n_range": {
"[0]": 123,
"[1]": 123
},
"one_arm_n": 123,
"anchor": "<string>"
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Run power analysis
Estimate episode counts needed to distinguish policy performance in a division.
curl --request POST \
--url https://softmax.com/api/observatory/v2/divisions/{division_id}/power-analysis \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"policy_ref": "<string>",
"elo_grid": [
123
],
"alpha": 0.05,
"power": 0.8,
"max_episodes": 1000
}
'import requests
url = "https://softmax.com/api/observatory/v2/divisions/{division_id}/power-analysis"
payload = {
"policy_ref": "<string>",
"elo_grid": [123],
"alpha": 0.05,
"power": 0.8,
"max_episodes": 1000
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
policy_ref: '<string>',
elo_grid: [123],
alpha: 0.05,
power: 0.8,
max_episodes: 1000
})
};
fetch('https://softmax.com/api/observatory/v2/divisions/{division_id}/power-analysis', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://softmax.com/api/observatory/v2/divisions/{division_id}/power-analysis",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'policy_ref' => '<string>',
'elo_grid' => [
123
],
'alpha' => 0.05,
'power' => 0.8,
'max_episodes' => 1000
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://softmax.com/api/observatory/v2/divisions/{division_id}/power-analysis"
payload := strings.NewReader("{\n \"policy_ref\": \"<string>\",\n \"elo_grid\": [\n 123\n ],\n \"alpha\": 0.05,\n \"power\": 0.8,\n \"max_episodes\": 1000\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://softmax.com/api/observatory/v2/divisions/{division_id}/power-analysis")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"policy_ref\": \"<string>\",\n \"elo_grid\": [\n 123\n ],\n \"alpha\": 0.05,\n \"power\": 0.8,\n \"max_episodes\": 1000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://softmax.com/api/observatory/v2/divisions/{division_id}/power-analysis")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"policy_ref\": \"<string>\",\n \"elo_grid\": [\n 123\n ],\n \"alpha\": 0.05,\n \"power\": 0.8,\n \"max_episodes\": 1000\n}"
response = http.request(request)
puts response.read_body{
"division_id": "<string>",
"anchor": {
"policy_ref": "<string>",
"policy_version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"note": "<string>",
"window": {
"rounds": 123,
"episodes_scanned": 123,
"oldest_round_at": "2023-11-07T05:31:56Z"
},
"mode_mix": {
"fractions": {},
"source": "campaign_board"
},
"modes": {},
"league_pooled": {},
"table": [
{
"elo": 123,
"per_mode_n_per_arm": {},
"blended_n_per_arm": 123,
"blended_n_range": {
"[0]": 123,
"[1]": 123
},
"one_arm_n": 123,
"anchor": "<string>"
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Bearer token issued by Softmax
Path Parameters
Division whose completed episodes should be analyzed.
^div_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$Body
Policy version UUID or name:vN label to use as the analysis anchor.
Elo differences for which to estimate required sample sizes.
1Two-sided false-positive rate.
0.000001 <= x <= 0.999999Target probability of detecting an effect.
0.000001 <= x <= 0.999999Maximum recent completed episodes to scan.
1 <= x <= 5000Response
Successful Response
Division whose history was analyzed.
Resolved policy anchor, or null for population analysis.
Show child attributes
Show child attributes
Explanation when the requested analysis is limited or unavailable.
Completed-round history included in the analysis.
Show child attributes
Show child attributes
Gameplay-mode distribution used for blended estimates.
Show child attributes
Show child attributes
Outcome estimates keyed by gameplay mode.
Show child attributes
Show child attributes
League-wide fallback estimates keyed by gameplay mode.
Show child attributes
Show child attributes
Required sample sizes for each requested Elo difference.
Show child attributes
Show child attributes