# One Line of Code in a Polar Bear Rule

> 6 to 22. Fixing one line of code moved a Fish and Wildlife Service estimate of harassed denning polar bears that far.

Published 2026-10-29 by Alaska AI. 9 slides.
Canonical: https://alaskaaihq.com/archive/2026-10-29/

## The story

One line of code. Harassed denning bears went 6 to 22.

It counted only the dens marked undisturbed.

A den with a missing value matched neither, so the old line skipped it. The new one counts it.

Quiet all winter. Disturbed after emergence.

The faulty output gave them 0 percent take. Fixed, each carries a 28 percent chance of Level B harassment for the sow and 72 percent of Level A for the cubs.

FWS's den take figures come from a simulation run 10,000 times.

About 6.5 dens a year sit within a mile of the work, the same in March and October.

To the eye, a den is one more drift.

From the air, the survey looks for heat.

Cameras on fixed-wing aircraft read a denning female's body heat through the snow, four times likelier to find a den than infrared from the ground, FWS says.

What the fixes changed, and what they didn't.

Vessel takes fell 16 to 10 in a separate fix to routes counted twice. Industry's own estimate is 123 bears, Level B only.

Fixed, then weighed no higher than industry's estimate.

FWS concedes the model's figures significantly exceed historical data and AOGA's. AOGA and one other commenter call it seriously flawed and not validated. FWS says the code and inputs are public.

FWS says the code is public. Should the model count for more?

The first den survey window opens November 25th.

## What we verified

- The U.S. Fish and Wildlife Service finalized incidental take regulations for polar bears in response to a request from the Alaska Oil and Gas Association. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-10-19/html/2026-21371.htm), primary document, 2026-10-19.
- The final rule covers polar bears and Pacific walruses during year-round oil and gas industry activities in the Beaufort Sea and the adjacent northern coast of Alaska. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-10-19/html/2026-21371.htm), primary document, 2026-10-19.
- The final regulations apply for a 5-year period. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-10-19/html/2026-21371.htm), primary document, 2026-10-19.
- No lands or waters inside the Arctic National Wildlife Refuge are included in the region the rule covers. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-10-19/html/2026-21371.htm), primary document, 2026-10-19.
- The final rule was published in the Federal Register on October 19th, 2026 at 91 FR 66204. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-10-19/html/2026-21371.htm), primary document, 2026-10-19.
- The rule took effect October 19th, 2026 and remains in effect through October 19th, 2031. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-10-19/html/2026-21371.htm), primary document, 2026-10-19.
- FWS invoked good cause to make the rule effective less than 30 days after publication. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-10-19/html/2026-21371.htm), primary document, 2026-10-19.
- The previous 5-year Beaufort Sea incidental take regulations ran through August 5th, 2026. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-10-19/html/2026-21371.htm), primary document, 2026-10-19.
- FWS received AOGA's request on September 30th, 2025, on behalf of AOGA members and 8 Star Alaska LLC. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-10-19/html/2026-21371.htm), primary document, 2026-10-19.
- Companies represented in AOGA's request include Alyeska Pipeline Service Company, Chevron, ConocoPhillips Alaska and ExxonMobil Alaska Production. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-10-19/html/2026-21371.htm), primary document, 2026-10-19.
- Hilcorp, Repsol and Santos are also among the companies named in AOGA's request. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-10-19/html/2026-21371.htm), primary document, 2026-10-19.
- While further streamlining the code for its predictive denning model, FWS discovered two errors that caused inaccurate model outputs. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-10-19/html/2026-21371.htm), primary document, 2026-10-19.
- In the first error, simulated dens with zero cubs that were simulated to receive lethal or Level A harassment were still being counted. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-10-19/html/2026-21371.htm), primary document, 2026-10-19.
- A den having zero cubs naturally is a roughly 7 percent chance in the model. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-10-19/html/2026-21371.htm), primary document, 2026-10-19.
- The second error was a line of code that miscounted a single category of disturbance events. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-10-19/html/2026-21371.htm), primary document, 2026-10-19.
- The dens left out by that line of code were undisturbed in early and late denning but disturbed in the post-emergence period. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-10-19/html/2026-21371.htm), primary document, 2026-10-19.
- FWS changed the code from counting all dens specifically marked undisturbed to counting all dens except those marked disturbed. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-10-19/html/2026-21371.htm), primary document, 2026-10-19.
- The new code also selects dens with a missing value, which the old code skipped. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-10-19/html/2026-21371.htm), primary document, 2026-10-19.
- FWS says it fixed the faulty line of code and reviewed the remaining code for similar issues. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-10-19/html/2026-21371.htm), primary document, 2026-10-19.
- FWS wrote a series of auto-check functions to keep a similar issue from appearing in future code updates. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-10-19/html/2026-21371.htm), primary document, 2026-10-19.
- The denning model runs 10,000 iterations of simulated dens exposed to the specified activities. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-10-19/html/2026-21371.htm), primary document, 2026-10-19.
- After the repair, those previously uncounted dens carry a 28 percent probability of Level B harassment of the sow and a 72 percent probability of Level A harassment of cubs. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-10-19/html/2026-21371.htm), primary document, 2026-10-19.
- The faulty output had counted no take at all for those dens. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-10-19/html/2026-21371.htm), primary document, 2026-10-19.
- After the code repairs, the estimated probability of lethal take decreased slightly. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-10-19/html/2026-21371.htm), primary document, 2026-10-19.
- After the code repairs, the Level A and Level B harassment estimates increased. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-10-19/html/2026-21371.htm), primary document, 2026-10-19.
- FWS also corrected vessel routes that had been counted in both its vessel analysis and its surface analysis. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-10-19/html/2026-21371.htm), primary document, 2026-10-19.
- FWS estimated 6.5 land-based dens a year within the activity area and a 1-mile buffer, with a median of 6 and a 95 percent credible interval of 1 to 14. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-10-19/html/2026-21371.htm), primary document, 2026-10-19.
- FWS's model puts the probability of one or more lethal takes in any year at 0.12. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-10-19/html/2026-21371.htm), primary document, 2026-10-19.
- FWS's model puts the probability of one or more lethal takes over the 5-year period at 0.43. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-10-19/html/2026-21371.htm), primary document, 2026-10-19.
- The final model estimated 94 takes by Level B harassment of 46 individual polar bears a year. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-10-19/html/2026-21371.htm), primary document, 2026-10-19.
- Of the final model's annual estimate, 5 takes of 5 polar bears come from denning. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-10-19/html/2026-21371.htm), primary document, 2026-10-19.
- Over the 5-year period the final model estimated 432 takes by Level B harassment of 209 polar bears. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-10-19/html/2026-21371.htm), primary document, 2026-10-19.
- Of the final 5-year estimate, 395 takes of 172 polar bears come from surface interactions. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-10-19/html/2026-21371.htm), primary document, 2026-10-19.
- Of the final 5-year estimate, 10 takes of 10 polar bears come from vessel activities. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-10-19/html/2026-21371.htm), primary document, 2026-10-19.
- Of the final 5-year estimate, 22 takes of 22 polar bears come from denning. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-10-19/html/2026-21371.htm), primary document, 2026-10-19.
- Over the 5-year period the final model estimated 13 takes by Level A harassment of 13 denning cubs. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-10-19/html/2026-21371.htm), primary document, 2026-10-19.
- AOGA's request estimated Level B harassment of 123 polar bears over the period, 120 on the surface and 3 denning, and no other forms of take. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-10-19/html/2026-21371.htm), primary document, 2026-10-19.
- AOGA's evidence included 2,646 records of 2,830 polar bear sightings reported by the oil and gas industry in the petition area from 2014 to 2024. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-10-19/html/2026-21371.htm), primary document, 2026-10-19.
- Two operators reported 43 Level B takes in the region for calendar year 2025. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-10-19/html/2026-21371.htm), primary document, 2026-10-19.
- FWS says it does not give its predictive models more weight than other sources of information. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-10-19/html/2026-21371.htm), primary document, 2026-10-19.
- FWS acknowledges that its model's take estimates significantly exceed historical data and AOGA's estimates. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-10-19/html/2026-21371.htm), primary document, 2026-10-19.
- FWS says it considered all inputs in line with Executive Order 14303, Restoring Gold Standard Science. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-10-19/html/2026-21371.htm), primary document, 2026-10-19.
- FWS acknowledges the final rule shifts its approach to what counts as best available scientific evidence compared with the 2021 to 2026 rule and the proposed rule. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-10-19/html/2026-21371.htm), primary document, 2026-10-19.
- FWS says the model code and most recent data inputs are published on regulations.gov under docket FWS-R7-ES-2025-1628. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-10-19/html/2026-21371.htm), primary document, 2026-10-19.
- According to the final rule, AOGA and one other commenter criticized the denning model as inaccurate and seriously flawed. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-10-19/html/2026-21371.htm), primary document, 2026-10-19.
- AOGA and that commenter also said the denning model has not been validated. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-10-19/html/2026-21371.htm), primary document, 2026-10-19.
- Aerial infrared surveys use cameras on fixed-wing aircraft to detect body heat from denning female polar bears coming through the snow. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-10-19/html/2026-21371.htm), primary document, 2026-10-19.
- FWS says aerial infrared surveys are four times more likely to detect polar bear dens than ground-based forward-looking infrared, because of blowing snow. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-10-19/html/2026-21371.htm), primary document, 2026-10-19.
- Operators working onshore in the denning season must survey all denning habitat within 1 mile of their activities using aerial infrared imagery. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-10-19/html/2026-21371.htm), primary document, 2026-10-19.
- The rule requires at least two aerial infrared surveys in high and medium density denning zones and at least one elsewhere onshore. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-10-19/html/2026-21371.htm), primary document, 2026-10-19.
- The first required aerial infrared survey must take place between November 25th and December 25th. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-10-19/html/2026-21371.htm), primary document, 2026-10-19.
- The second required aerial infrared survey must take place between December 15th and January 15th. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-10-19/html/2026-21371.htm), primary document, 2026-10-19.
- FWS concluded a third aerial infrared survey is not practicable and removed it from the final rule. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-10-19/html/2026-21371.htm), primary document, 2026-10-19.
- AOGA told FWS a required third aerial infrared survey was not practicable for logistical, human safety and economic reasons. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-10-19/html/2026-21371.htm), primary document, 2026-10-19.
- FWS says third aerial infrared surveys flown under the 2021 to 2026 rule detected no additional dens. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-10-19/html/2026-21371.htm), primary document, 2026-10-19.
- Under AOGA's measures, a suspected den found by aerial infrared survey gets a mitigation zone for the rest of the denning season, which runs November to April. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-10-19/html/2026-21371.htm), primary document, 2026-10-19.
- Operators must keep a 1-mile operational mitigation zone around all known or suspected polar bear dens during the denning season. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-10-19/html/2026-21371.htm), primary document, 2026-10-19.
- FWS estimates no more than 20 Pacific walruses a year will be taken by Level B harassment. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-10-19/html/2026-21371.htm), primary document, 2026-10-19.
- FWS puts the Pacific walrus population at approximately 257,193 animals. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-10-19/html/2026-21371.htm), primary document, 2026-10-19.
- FWS calculates 20 walruses a year as 0.008 percent of the population. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-10-19/html/2026-21371.htm), primary document, 2026-10-19.
- FWS received 85,589 comments on the proposed rule. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-10-19/html/2026-21371.htm), primary document, 2026-10-19.
- Of those comments, 77,468 came through mass mailing campaigns. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-10-19/html/2026-21371.htm), primary document, 2026-10-19.
- FWS used a tool called DocketScope to aggregate the public comments. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-10-19/html/2026-21371.htm), primary document, 2026-10-19.
- FWS published the proposed rule in the Federal Register on March 9th, 2026 at 91 FR 11240. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-03-09/html/2026-04558.htm), primary document, 2026-03-09.
- The proposed and final rules share docket number FWS-R7-ES-2026-0694. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-03-09/html/2026-04558.htm), primary document, 2026-03-09.
- The proposed rule's model estimated 422 takes by Level B harassment of 199 polar bears over 5 years. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-03-09/html/2026-04558.htm), primary document, 2026-03-09.
- The proposed rule's model estimated 91 takes by Level B harassment of 43 polar bears a year, including 1 take of 1 denning bear. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-03-09/html/2026-04558.htm), primary document, 2026-03-09.
- The proposed rule's 5-year estimate included 395 takes of 172 polar bears from surface interactions. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-03-09/html/2026-04558.htm), primary document, 2026-03-09.
- The proposed rule's 5-year estimate included 6 takes of 6 polar bears from denning. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-03-09/html/2026-04558.htm), primary document, 2026-03-09.
- The proposed rule's model estimated four takes by Level A harassment of four denning cubs over 5 years. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-03-09/html/2026-04558.htm), primary document, 2026-03-09.
- The proposed rule had added a third aerial infrared survey of polar bear denning habitat as an extra mitigation measure. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-03-09/html/2026-04558.htm), primary document, 2026-03-09.
- The proposed rule also estimated 6.5 land-based dens, the same figure as the final rule. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-03-09/html/2026-04558.htm), primary document, 2026-03-09.
- FWS estimates that at most 49 polar bears would be taken by Level A or Level B harassment in any single year. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-10-19/html/2026-21371.htm), primary document, 2026-10-19.
- FWS says 49 polar bears would be 5.4 percent of the current Southern Beaufort Sea stock estimate of 907 animals. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-10-19/html/2026-21371.htm), primary document, 2026-10-19.
- FWS says 49 polar bears would be 6.0 percent of a Southern Beaufort Sea stock of 819 animals. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-10-19/html/2026-21371.htm), primary document, 2026-10-19.
- A January 2nd, 2025 draft stock assessment put the Southern Beaufort Sea polar bear stock at 819 bears, mainly because of a shifted stock boundary. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-10-19/html/2026-21371.htm), primary document, 2026-10-19.
- Commenters argued, as the final rule summarizes them, that killing four cubs or one maternal bear and harassing up to 5.7 percent of the population in a single year is not a small number for a threatened, declining population. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-10-19/html/2026-21371.htm), primary document, 2026-10-19.
- FWS expects updated abundance results for the Southern Beaufort Sea polar bear stock by the end of 2026. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-10-19/html/2026-21371.htm), primary document, 2026-10-19.
- One commenter urged FWS to commission new population surveys before finalizing the rule, calling the most recent population data nearly a decade old. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-10-19/html/2026-21371.htm), primary document, 2026-10-19.
- FWS says the most recent Southern Beaufort Sea polar bear population estimate used data through 2015. [U.S. Fish and Wildlife Service, Federal Register (govinfo)](https://www.govinfo.gov/content/pkg/FR-2026-10-19/html/2026-21371.htm), primary document, 2026-10-19.

Slides and the deck PDF are linked from the canonical page.
