Supporting Hubble and JWST has spurred quite a lot of work in various computational fields. For instance, I’m using the AstroPy functions.

Another nifty example:

Although Artificial Intelligence and Discrete Optimization had known and reasoned about Constraint Satisfaction Problems for many years, it was not until the early 1990s that this process for solving large CSPs had been codified in algorithmic form. Early on, Mark Johnston of the Space Telescope Science Institute looked for a method to schedule astronomical observations on the Hubble Space Telescope. In collaboration with Hans-Martin Adorf of the Space Telescope European Coordinating Facility, he created a neural network capable of solving a toy *n*-queens problem (for 1024 queens).[3][4] Steven Minton and Andy Philips analyzed the neural network algorithm and separated it into two phases: (1) an initial assignment using a greedy algorithm and (2) a conflict minimization phases (later to be called “min-conflicts”). A paper was written and presented at AAAI-90; Philip Laird provided the mathematical analysis of the algorithm.

Subsequently, Mark Johnston and the STScI staff used min-conflicts to schedule astronomers’ observation time on the Hubble Space Telescope.

Animation of min-conflicts resolution of 8-queens. First stage assigns columns greedily minimizing conflicts, then solves

Min-Conflicts solves the

N-Queens Problem by randomly selecting a column from the chess board for queen reassignment. The algorithm searches each potential move for the number of conflicts (number of attacking queens), shown in each square. The algorithm moves the queen to the square with the minimum number of conflicts, breaking ties randomly. Note that the number of conflicts is generated by each new direction that a queen can attack from. If two queens would attack from the same direction (row, or diagonal) then the conflict is only counted once. Also note that if a queen is in a position in which a move would put it in greater conflict than its current position, it does not make a move. It follows that if a queen is in a state of minimum conflict, it does not have to move.This algorithm’s run time for solving

N-Queens is independent of problem size. This algorithm will even solve themillion-queens problemon average of 50 steps. This discovery and observations led to a great amount of research in 1990 and began research on local search problems and the distinctions between easy and hard problems.N-Queens is easy for local search because solutions are densely distributed throughout the state space. It is also effective for hard problems. For example, it has been used to schedule observations for the Hubble Space Telescope, reducing the time taken to schedule a week of observations from three weeks to around 10 minutes.[5]