We have ideas about how it works, sure. We know a bit about how the basics of the brain works and we know some correlations of what areas of the brain electrically light up in various conditions, but that's about the extent of it.
Its hard to really create an artificial version of something without pretty well understanding the real thing. In the meantime, brute forcing it is probably the best (and most common) approach.