sum beam search