  We introduce a new halo/subhalo finder, HIKER (a Halo fInder based on
KERnel-shift algorithm), which takes advantage of a machine learning method --
the mean-shift algorithm combined with the Plummer kernel function, to
effectively locate density peaks corresponding to halos/subhalos in density
field. Based on these density peaks, dark matter halos are identified as
spherical overdensity structures, and subhalos are bound substructures with
boundaries at their tidal radius. By testing HIKER code with mock halos, we
show that HIKER performs excellently in recovering input halo properties.
Especially, HIKER has higher accuracy in locating halo/subhalo centres than
most halo finders. With cosmological simulations, we further show that HIKER
reproduces the abundance of dark matter halos and subhalos quite accurately,
and the HIKER halo/subhalo mass functions and $V_{max}$ functions are in good
agreement with two widely used halo finders, SUBFIND and AHF.
