We present an adjoint method for optimization of the spatially inhomogeneous Boltzmann equation for rarefied gas dynamics. The adjoint method is derived using a "discretize then optimize" approach. Discretization (in time and velocity) is via the Direct Simulation Monte Carlo (DSMC) method, and adjoint equations are derived from an augmented Lagrangian. The boundary conditions that are included in this analysis include spectral reflection, thermal reflection, and inflow boundary conditions. For thermal reflection, a "score function" is included as a statistical regularization. This is joint work with Yunan Yang (Cornell).