Antenna Placement
Seven antennas on a 2D map with obstacles. The GA evolves where each one sits and how far it reaches to maximise coverage and limit wasted overlap.
Go to the live page Open the Antenna Placement demoThe Antenna Placement demo asks the genetic algorithm to put seven antennas (you can pick anywhere from three to twelve) on a 2D map so that they reach as much of the open area as possible without spending budget on overlapping coverage. The map is a city block seen from above: streets, a few parks and some buildings. Buildings block the signal in straight lines, so a "good" layout is one that works around them.
The Problem¶
Every antenna projects a circular coverage zone, and each antenna has its own radius that the genetic algorithm chooses along with its position. Anywhere inside that circle is reachable, unless an obstacle sits on the line between the antenna and the point. Coverage is good. Two or three antennas reaching the same point at the same time is wasted budget, a bigger radius costs more power, and antennas bunched up close together leave other areas empty. The genetic algorithm needs to balance all of these.
How a Run Looks¶
Click Start. Twenty-five layouts are evaluated immediately. The leader, the layout with the highest fitness this generation, fades in across about a second and a half. Each numbered cell tower shows the area it actually reaches: its range, cut off by the "signal shadow" behind any building in the way, with a pulse travelling out to the edge. Ground that no tower reaches is tinted red. A small key in the corner of the map explains the symbols. The other layouts are hidden by default; turn on Show all layouts next to the Start button to draw their range outlines behind the leader.
The platform then evolves the population. Two elites carry over unchanged, and the rest are children of tournament-of-three winners with uniform crossover and small per-gene random nudges. The next round arrives a moment later and the leader looks slightly cleaner.
Over the generations the antennas spread out, trim their radius where they would only double up on a neighbour, and the green tint pushes into the corners. In our tests the best layout after 50 generations reached about nine tenths of the open ground, up from about three fifths for the best random first layout. The history strip under the canvas keeps the best layout from every generation.
Fitness¶
The browser samples a 100 by 60 grid of points across the map. For each open point it counts how many antennas reach it. Points inside an obstacle do not count. Fitness is covered - 0.5 * overlap - 0.3 * power - 0.4 * spread, never lower than zero. Higher is better.
coveredis the share of open points reached by at least one antenna.overlapis the share of all antenna hits that were not needed. A point reached by three antennas adds two wasted hits.poweris the average radius across the antennas, scaled so the smallest allowed radius is 0 and the largest is 1.spreadmeasures how tightly antennas crowd their nearest neighbour. An antenna sitting closer to its neighbour than a set fraction of their combined radii adds a penalty that grows the closer they get.
Settings to Try¶
The Settings panel has two groups. Problem sets the Number of antennas (3 to 12, default 7) and the Population size (10 to 40 layouts per generation, default 25). Genetic Algorithm covers mutation probability and range, tournament size, how many elites carry over, and the maximum number of generations. Problem and genetic-algorithm changes apply on the next Reset.
What the Achievement Rewards¶
The first time a best-of-generation layout scores at least 0.65, the Signal everywhere achievement unlocks for signed-in users. How quickly you get there depends on the map; tougher obstacle layouts take longer. In our tests (48 maps, default settings), about nine runs in ten got there within 50 generations, and none at the first generation.
For more on how the demos catalog works, see What the Demos Do.