AI Is Helping to Stop Animal Poaching and Food Insecurity

This professor is using game theory to tackle these problems

5 min read
A photograph of a woman carrying a large brown box.

Fei Fang, an assistant professor of computer science at Carnegie Mellon, delivering a box of food to people in need for nonprofit 412 Food Rescue in Pittsburgh.

Fei Fang

When Fei Fang was a graduate student she was introduced to game theory—mathematical models that describe strategic interactions among rational decision-makers. The IEEE member knew she had found her calling. She has combined the modelling technique with machine learning to thwart terrorist attacks and reduce animal poaching.

For Fang’s work in the field, she was named one of IEEE Intelligent Systems magazine’s “AI’s 10 to Watch in 2020.”

Fang, an assistant professor of computer science at Carnegie Mellon, is now working with 412 Food Rescue, a nonprofit in Pittsburgh, to improve its system for alerting volunteers when surplus food is available for pickup.

“Food waste is a huge problem, and there are a lot of people suffering from food insecurity in Pittsburgh,” Fang says. The nonprofit “is such a cool organization, doing a really amazing thing, and I thought that maybe I could help.”


Fang started programming as a student at Changzhou Senior High School, in China. She says it intrigued her because “you can do something that can have a tangible impact.”

Although she enjoyed coding, she decided to pursue a degree in biology at Tsinghua University, in Beijing. She eventually changed her major to electrical engineering because, she says, she found it more interesting. She graduated in 2011 with a bachelor’s degree, then went to the United States to pursue a doctorate at the University of Southern California, in Los Angeles.

There, Fang joined computer science professor Milind Tambe’s team and led a research project that sought to use computational game theory to help the U.S. Coast Guard plan patrol routes to protect the Staten Island Ferry system from terrorist attacks.

A similar AI algorithm had been used for airport security since 2007 to schedule canine patrols. She and her research colleagues planned on applying the system to the ferry service but found they could not. For the airport algorithm to work for seaport security, she says, it had to have spatial temporal reasoning: the ability to take into account the movement of the ferries and patrol boats.

“We had to deal with an infinite number of patrol routes the U.S. Coast Guard patrol boats could take,” she says. “The attacker could also strike the ferries at any time. This makes the problem very different [from airport security] and more challenging because there are an infinite number of actions possible on both sides.”

She and her team came up with a compact representation in which the AI algorithm considers all the times and locations terrorists might attack. The Coast Guard deployed the PROTECT (Port Resilience Operational/Tactical Enforcement to Combat Terrorism) model in 2013, and it is still in use.


After the successful deployment of the ferry safety algorithm, Fang explored other problems AI could solve. Under Tambe’s leadership, she and her colleagues developed a system to stop animal poachers on wildlife preserves before they strike.

The machine-learning system, dubbed PAWS (Protection Assistant for Wildlife Security), uses data from past patrols to predict where poaching is likely to occur and a game-theory model to help generate randomized, unpredictable patrol routes, according to a 2018 IEEE Spectrum article on the project.

Save the Wildlife, Save the Planet: Protection Assistant for Wildlife Security (PAWS)

The first PAWS trial was conducted in Malaysia in 2014. Fang and her team sent rangers to protected areas where endangered tigers live. The rangers found footprints and other signs of human activity, Fang says. But the trial also showed that rangers couldn’t follow the routes in a straight line, like the system recommended, because of the terrain. Fang and her colleagues refined their system and began testing the improved tool, which took the topography into account when generating recommended patrol routes.

Fang earned her Ph.D. in computer science in 2016 and joined Harvard as a postdoctoral fellow. But she continued to work with Tambe on PAWS.

More trials were conducted in Uganda in 2016 in collaboration with the Queen Elizabeth National Park’s Wildlife Conservation Society and in China in 2017 and 2019 with the World Wildlife Foundation. Park rangers were sent to locations that PAWS predicted to be poaching hotspots that were not frequently patrolled. The rangers found several snares used to catch animals, Fang says.

A photograph of a woman holding a bundle of wires tied to a small tree branch.Fang shows off a tiger snare discovered in a wildlife preserve in northeast China.Yongchao Jing

She participated in a two-day field test of the system in China, and the experience inspired her to add a capability to PAWS. The new feature helps rangers make decisions while on patrol. If rangers find poachers’ footprints during a patrol, for example, they can use the system to decide whether they should deviate from their original route and follow the trail.

This year Microsoft added PAWS to its Azure platform, a portfolio of AI services designed for developers and data scientists. It also was integrated into SMART, a platform that consists of software and analysis tools designed to help conservationists manage and protect wildlife. SMART is used at more than 600 conservation sites around the globe.

“I’m really happy to see that part of our algorithm has been integrated into the software and is now available worldwide,” Fang says.

Fang left Harvard in 2017 to join Carnegie Mellon as an assistant professor.


Food waste and food insecurity are huge problems around the world, including Pittsburgh. Fang and her research team at Carnegie Mellon’s Institute for Software Research are developing an algorithm to help 412 Food Rescue increase the pickup rate of good but unsellable food from grocery stores. Volunteers pick up the food and deliver it to homeless shelters and people in need.

The nonprofit uses a smartphone app to notify volunteers who are within 8 kilometers of the pickup zone when there is food available. But, according to Fang, it is not guaranteed that a volunteer will accept the task. The organization’s co-founder and chief executive, Leah Lizarondo, turned to Fang for help to make the process more efficient.

Volunteers were notified through the app’s push notification. If no one accepted the request after 15 minutes, a volunteer would text or call other volunteers to find out if they could pick it up.

“The first idea we had was to try to use machine learning to predict which food rescue request might be at risk of not being accepted by volunteers,” Fang says. “Once those orders were identified, the dispatchers in the organization could take action and try to contact volunteers they know, or see if there are other ways that the food could be delivered.”

The second idea, devised by her student Ryan Shi, was to improve the push notification scheme. He realized that the 8-km radius and 15-minute wait time might not be the best options, so the team developed an algorithm to determine the optimal choices based on historical data. Now the scheme’s radius is 8.8 km and the waiting time is 16 and a half minutes.

The new system was deployed in February 2020. In one month, the pickup rate increased from 84 percent of food being claimed to 88 percent. The time it took for a task to be accepted decreased from 78 minutes to 43 minutes.

Fang and her team are further improving the system by making it possible for the algorithm to suggest specific volunteers who are more likely to accept and pick up food from certain stores.


Fang joined IEEE this year so that she could keep current with technological advances through the organization’s publications, including IEEE Spectrum.

“I also wanted the opportunity to publish my work in IEEE journals,” she says. You can find several of her articles in the IEEE Xplore Digital Library.

She says she hopes to collaborate with fellow IEEE members on projects.

The Conversation (1)
John Cole11 Dec, 2021

Great reporting on an IEEE member's accomplishments and promise.Congratulations to Dr. Fang on her achievements and plans.She is a wonderful addition to the intellectual wealth from which we all benefit. Thanks, Joanna Goodrich, I'll look at your other articles. Thanks, Dr. Fang, I'll look at your work for ideas.

Get unlimited IEEE Spectrum access

Become an IEEE member and get exclusive access to more stories and resources, including our vast article archive and full PDF downloads
Get access to unlimited IEEE Spectrum content
Network with other technology professionals
Establish a professional profile
Create a group to share and collaborate on projects
Discover IEEE events and activities
Join and participate in discussions

The Inner Beauty of Basic Electronics

Open Circuits showcases the surprising complexity of passive components

5 min read
A photo of a high-stability film resistor with the letters "MIS" in yellow.
All photos by Eric Schlaepfer & Windell H. Oskay

Eric Schlaepfer was trying to fix a broken piece of test equipment when he came across the cause of the problem—a troubled tantalum capacitor. The component had somehow shorted out, and he wanted to know why. So he polished it down for a look inside. He never found the source of the short, but he and his collaborator, Windell H. Oskay, discovered something even better: a breathtaking hidden world inside electronics. What followed were hours and hours of polishing, cleaning, and photography that resulted in Open Circuits: The Inner Beauty of Electronic Components (No Starch Press, 2022), an excerpt of which follows. As the authors write, everything about these components is deliberately designed to meet specific technical needs, but that design leads to “accidental beauty: the emergent aesthetics of things you were never expected to see.”

From a book that spans the wide world of electronics, what we at IEEE Spectrum found surprisingly compelling were the insides of things we don’t spend much time thinking about, passive components. Transistors, LEDs, and other semiconductors may be where the action is, but the simple physics of resistors, capacitors, and inductors have their own sort of splendor.

High-Stability Film Resistor

A photo of a high-stability film resistor with the letters "MIS" in yellow.

All photos by Eric Schlaepfer & Windell H. Oskay

This high-stability film resistor, about 4 millimeters in diameter, is made in much the same way as its inexpensive carbon-film cousin, but with exacting precision. A ceramic rod is coated with a fine layer of resistive film (thin metal, metal oxide, or carbon) and then a perfectly uniform helical groove is machined into the film.

Instead of coating the resistor with an epoxy, it’s hermetically sealed in a lustrous little glass envelope. This makes the resistor more robust, ideal for specialized cases such as precision reference instrumentation, where long-term stability of the resistor is critical. The glass envelope provides better isolation against moisture and other environmental changes than standard coatings like epoxy.

15-Turn Trimmer Potentiometer

A photo of a blue chip
A photo of a blue chip on a circuit board.

It takes 15 rotations of an adjustment screw to move a 15-turn trimmer potentiometer from one end of its resistive range to the other. Circuits that need to be adjusted with fine resolution control use this type of trimmer pot instead of the single-turn variety.

The resistive element in this trimmer is a strip of cermet—a composite of ceramic and metal—silk-screened on a white ceramic substrate. Screen-printed metal links each end of the strip to the connecting wires. It’s a flattened, linear version of the horseshoe-shaped resistive element in single-turn trimmers.

Turning the adjustment screw moves a plastic slider along a track. The wiper is a spring finger, a spring-loaded metal contact, attached to the slider. It makes contact between a metal strip and the selected point on the strip of resistive film.

Ceramic Disc Capacitor

A cutaway of a Ceramic Disc Capacitor
A photo of a Ceramic Disc Capacitor

Capacitors are fundamental electronic components that store energy in the form of static electricity. They’re used in countless ways, including for bulk energy storage, to smooth out electronic signals, and as computer memory cells. The simplest capacitor consists of two parallel metal plates with a gap between them, but capacitors can take many forms so long as there are two conductive surfaces, called electrodes, separated by an insulator.

A ceramic disc capacitor is a low-cost capacitor that is frequently found in appliances and toys. Its insulator is a ceramic disc, and its two parallel plates are extremely thin metal coatings that are evaporated or sputtered onto the disc’s outer surfaces. Connecting wires are attached using solder, and the whole assembly is dipped into a porous coating material that dries hard and protects the capacitor from damage.

Film Capacitor

An image of a cut away of a capacitor
A photo of a green capacitor.

Film capacitors are frequently found in high-quality audio equipment, such as headphone amplifiers, record players, graphic equalizers, and radio tuners. Their key feature is that the dielectric material is a plastic film, such as polyester or polypropylene.

The metal electrodes of this film capacitor are vacuum-deposited on the surfaces of long strips of plastic film. After the leads are attached, the films are rolled up and dipped into an epoxy that binds the assembly together. Then the completed assembly is dipped in a tough outer coating and marked with its value.

Other types of film capacitors are made by stacking flat layers of metallized plastic film, rather than rolling up layers of film.

Dipped Tantalum Capacitor

A photo of a cutaway of a Dipped Tantalum Capacitor

At the core of this capacitor is a porous pellet of tantalum metal. The pellet is made from tantalum powder and sintered, or compressed at a high temperature, into a dense, spongelike solid.

Just like a kitchen sponge, the resulting pellet has a high surface area per unit volume. The pellet is then anodized, creating an insulating oxide layer with an equally high surface area. This process packs a lot of capacitance into a compact device, using spongelike geometry rather than the stacked or rolled layers that most other capacitors use.

The device’s positive terminal, or anode, is connected directly to the tantalum metal. The negative terminal, or cathode, is formed by a thin layer of conductive manganese dioxide coating the pellet.

Axial Inductor

An image of a cutaway of a Axial Inductor
A photo of a collection of cut wires

Inductors are fundamental electronic components that store energy in the form of a magnetic field. They’re used, for example, in some types of power supplies to convert between voltages by alternately storing and releasing energy. This energy-efficient design helps maximize the battery life of cellphones and other portable electronics.

Inductors typically consist of a coil of insulated wire wrapped around a core of magnetic material like iron or ferrite, a ceramic filled with iron oxide. Current flowing around the core produces a magnetic field that acts as a sort of flywheel for current, smoothing out changes in the current as it flows through the inductor.

This axial inductor has a number of turns of varnished copper wire wrapped around a ferrite form and soldered to copper leads on its two ends. It has several layers of protection: a clear varnish over the windings, a light-green coating around the solder joints, and a striking green outer coating to protect the whole component and provide a surface for the colorful stripes that indicate its inductance value.

Power Supply Transformer

A photo of a collection of cut wires
A photo of a yellow element on a circuit board.

This transformer has multiple sets of windings and is used in a power supply to create multiple output AC voltages from a single AC input such as a wall outlet.

The small wires nearer the center are “high impedance” turns of magnet wire. These windings carry a higher voltage but a lower current. They’re protected by several layers of tape, a copper-foil electrostatic shield, and more tape.

The outer “low impedance” windings are made with thicker insulated wire and fewer turns. They handle a lower voltage but a higher current.

All of the windings are wrapped around a black plastic bobbin. Two pieces of ferrite ceramic are bonded together to form the magnetic core at the heart of the transformer.

This article appears in the February 2023 print issue.