Most chess engine opening books weight their branches to pick certain moves x% of the time, and offer 0 or negative value to 'bad moves' never to pick.
e.g. 1.e4, d4, c4 and Nf3 will get picked more often than 1. b3, c3, nc3 and f4, and 1. g3, e3 even less (or not at all).
e.g. 1.e4, d4, c4 and Nf3 will get picked more often than 1. b3, c3, nc3 and f4, and 1. g3, e3 even less (or not at all).