Search
The search command, which is used by pressing the [s] key, causes you to search the 8 squares surrounding you for secret doors, secret corridors, hidden monsters, and hidden traps. It may require more than one attempt to locate many of these.
Searching will always reveal hidden or invisible monsters which are in any square adjacent to you.
Your chance of success for other forms of searching is primarily dependent on Luck.
Wielding Excalibur improves your chance of finding secret doors and secret corridors based on its enchantment. Wearing any sort of lenses also improves your chance of finding these.
No other factors affect the success rate of searching.
The automatic searching property will cause you to automatically search (just like using the command) every turn. Some roles can gain this as an intrinsic, and it is granted by wielding Excalibur or wearing a ring of searching.