It has to do with entrance onto property without a possessory right or color of title. Being an intruder doesn’t require intent (much like the tort of trespass doesn’t require intent other than simply the intent to enter the property). It just requires you to be somewhere you don’t have the right to be. Some states may have specific statutory definitions, but what I stated above is consistent with common law (old case law) and consistent with what you would find in Black’s Law Dictionary (much better source than Webster’s or any “normal” dictionary.)
So, someone drunk or with dementia going into someone else’s house is absolutely an intruder (and a trespasser). That said, most castle doctrine states ALSO require an intruder to be there for a felonious purpose or to be threatening life/safety before you can use deadly force.