Bad Seed is an artificial intelligence based autonomous scheduler used at Brookhaven National Laboratory (BNL) in the National Synchrotron Lightsource II. As with the majority of technology used at BNL, there is no such thing as “optimized enough”. The only thing holding back science is time and resources, so, by working on this project, I hoped to mitigate some of those limitations.

At the beamlines, samples frequently need to be remeasured in order to make sure that we can get a clear reading on them. But there is so much data generated in even one sample reading! How can we know which need to be remeasured?


The original answer:
Just measure all of them 100 times!
Well.. that wastes a lot of time....
.png)
The goal is to get an agent (the computer’s decisions) to learn the rules of a particular environment. The environment will reward or penalize the agent for its decisions. For example, one of the requirements for our environment is that we do not want the agent to pick the same sample over and over again. It might look something like this:
In the actual coding environment, it looks more like this:
.png)
Based on previous experimentation with cartpole and other basic reinforcement learning paradigms, the two agents that seemed most promising were the Advantage Actor Critic Algorithm (A2C) and the Double Deep Q-Learning (DDQN) algorithms. After testing on similar environments to the one described above, A2c seemed like the best choice because it learned faster:
Environment Goals:
.png)
.png)
.png)
.png)
Further Information:
This work is featured in this article:
https://iopscience.iop.org/article/10.1088/2632-2153/abc9fc/pdf
For a specialized report on the specific work done to complete the project, please read:
https://drive.google.com/file/d/1FUCtx72FnDm6gyakxc_htkzvooM9sN-m/view?usp=sharing
It can also be summarized by the following poster, which was presented on the SULI Symposium for the National Synchrotron Light Source II:
https://drive.google.com/file/d/1CsBQ0MGqiX8qP-ZjDgeAfuaB1RT17KMp/view?usp=sharing
The code dedicated to building this tool:
https://github.com/claracoo/bad_seed
The design structure for a possible front end interface:
https://www.figma.com/file/zcFOWq9VgoGqo0tZ4Gb0ns/SULI_Design?node-id=0%3A1