A search is presented for the associated production of a Higgs boson with a top quark pair in the all-jet final state. Events containing seven or more jets are selected from a sample of proton-proton collisions at root s = 13 TeV collected with the CMS detector at the LHC in 2016, corresponding to an integrated luminosity of 35.9 fb(-1). To separate the t (t) over barH signal from the irreducible t (t) over bar + b (b) over bar background, the analysis assigns leading order matrix element signal and background probability densities to each event. A likelihood-ratio statistic based on these probability densities is used to extract the signal. The results are provided in terms of an observed t (t) over barH signal strength relative to the standard model production cross section mu = sigma/sigma(SM), assuming a Higgs boson mass of 125 GeV. The best fit value is (mu) over cap = 0.9 +/- 0.7(stat) +/- 1.3(syst) = 0.9 +/- 1.5 (tot), and the observed and expected upper limits are, respectively, mu < 3.8 and < 3.1 at 95% confidence levels.