Clearly mosquitoes can be treated as non-sentient,
Disagree that it's clear. I've had interactions with insects that I could only parse as "interaction between two sentient beings, although there's a wide gulf of expectation and sensation and emotion and so forth which pushes it right up to the edges of that category." I've not had many interactions with mosquitos beyond "You try to suck my blood because you're hungry and I'm a warm, CO2-breathing blood source in your vicinity", but I assume that there's something it feels like to be a mosquito, that it has a little mosquito mind that might not be very flexible or impressive when weighted against a human one, but it's there, it's what the mosquito uses to navigate its environment and organize its behavior intelligibly, and all of its searching for mates and blood and a nice place to lay eggs is felt as a drive... that in short it's not just a tiny little bloodsucking p-zombie. That doesn't mean I accord it much moral weight either -- I won't shed any tears over it if I should smash it while reflexively brushing it aside, even though I'm aware arthropods have nociception and, complex capacity for emotional suffering or not, they still feel pain and I prefer not to inflict that needlessly (or without a safeword).
But I couldn't agree it isn't sentient, that it's just squishy clockwork.
Just "experiencing pain" is probably too wide a net for moral worth, as nociceptors are present in most animals, including the aforementioned mosquito.
It seems to me that the problem you're really trying to solve is how to sort the world into neat piles marked "okay to inflict my desires on regardless of consequences" and "not okay to do that to." Which is probably me just stating the obvious, but the reason I call attention to it is I literally don't get that. The universe just is not so tidy; personhood or whatever word you wish to use is not just one thing, and the things that make it up seem to behave such that the question is less like "Is this a car or not?" and more like "Is this car worth 50,000 dollars, to me, at this time?"
Suffering is probably a more restrictive term, but I am not aware of a measurable definition of it.
That is ever the problem -- you can't even technically demonstrate without lots of inference that your best friend or your mother really suffer. This is why I don't like drawing binary boundaries on that basis.
It is also probably sometimes too narrow, as most of us would find it immoral to harm people who do not experience suffering due to a mental or a physical issue, like pain insensitivity or asymbolia.
Though strangely enough, plenty of LWers seem to consider many disorders with similarly pervasive consequences for experience to result in "lives barely worth living..."
I've had interactions with insects that I could only parse as "interaction between two sentient beings
Why stop there? Humans have also had interactions with lightning that they could only parse as interactions between two sentient beings!
Why is Bayes' Rule useful? Most explanations of Bayes explain the how of Bayes: they take a well-posed mathematical problem and convert given numbers to desired numbers. While Bayes is useful for calculating hard-to-estimate numbers from easy-to-estimate numbers, the quantitative use of Bayes requires the qualitative use of Bayes, which is noticing that such a problem exists. When you have a hard-to-estimate number that you could figure out from easy-to-estimate numbers, then you want to use Bayes. This mental process of testing beliefs and searching for easy experiments is the heart of practical Bayesian thinking. As an example, let us examine 1 Kings 3:16-28:
Notice that Solomon explicitly identified competing hypotheses, raising them to the level of conscious attention. When each hypothesis has a personal advocate, this is easy, but it is no less important when considering other uncertainties. Often, a problem looks clearer when you branch an uncertain variable on its possible values, even if it is as simple as saying "This is either true or not true."
Solomon considers the empirical consequences of the competing hypotheses, searching for a test which will favor one hypothesis over another. When considering one hypothesis alone, it is easy to find tests which are likely if that hypothesis is true. The true mother is likely to say the child is hers; the true mother is likely to be passionate about the issue. But that's not enough; we need to also estimate how likely those results are if the hypothesis is false. The false mother is equally likely to say the child is hers, and could generate equal passion. We need a test whose results significantly depend on which hypothesis is actually true.
Witnesses or DNA tests would be more likely to support the true mother than the false mother, but they aren't available. Solomon realizes that the claimant's motivations are different, and thus putting the child in danger may cause the true mother and false mother to act differently. The test works, generates a large likelihood ratio, and now his posterior firmly favors the first claimant as the true mother.