Algorithm 2 Bag-level Beam Search switch a 9: case GEN(ei+1) 10: case RE(r, n) 12: , is then the highest scoring computation ending on a GEN or an RE 7 : There are exponentially many computations in C(i, j) so taking exact maxima is intractable.
we only take maxima over beams B(i, j) which we update according to 7 We omit actions' parameters for conciseness.