  We present a method of selecting quasars up to redshift $\approx$ 6 with
random forests, a supervised machine learning method, applied to Pan-STARRS1
and WISE data. We find that, thanks to the increasing set of known quasars we
can assemble a training set that enables supervised machine learning algorithms
to become a competitive alternative to other methods up to this redshift. We
present a candidate set for the redshift range 4.8 to 6.3 which includes the
region around z = 5.5 where quasars are difficult to select due to photometric
similarity to red and brown dwarfs. We demonstrate that under our survey
restrictions we can reach a high completeness ($66 \pm 7 \%$ below redshift 5.6
/ $83^{+6}_{-9}\%$ above redshift 5.6) while maintaining a high selection
efficiency ($78^{+10}_{-8}\%$ / $94^{+5}_{-8}\%$). Our selection efficiency is
estimated via a novel method based on the different distributions of quasars
and contaminants on the sky. The final catalog of 515 candidates includes 225
known quasars. We predict the candidate catalog to contain an additional
$148^{+41}_{-33}$ new quasars below redshift 5.6 and $45^{+5}_{-8}$ above and
make the catalog publicly available. Spectroscopic follow-up observations of 37
candidates lead us to discover 20 new high redshift quasars (18 at $4.6\le
z\le5.5$, 2 $z\sim5.7$). These observations are consistent with our predictions
on efficiency. We argue that random forests can lead to higher completeness
because our candidate set contains a number of objects that would be rejected
by common color cuts, including one of the newly discovered redshift 5.7
quasars.
