Friday, July 24, 2015

Philosophic burden of proof in God debates

Abstract: Requiring a position to meet its burden of proof before it can be believed is a bad approach to decision-making. In reality, decisions often need to be made before any proofs can be produced. In this essay, I show what are the flaws of the burden-of-proof logic. I suggest a different way of evaluating beliefs, which is consistent with necessity of making decisions under uncertainty. I also address most popular arguments put forward by the proponents of the burden-of-proof logic. Finally, I try to explain what are the reasons and consequences of adopting their way of thinking. 


Introduction

Burden of proof is a framework of logical thinking used to establish validity of certain claims about reality. It indicates which side should provide arguments for their case. Many atheists argue that theists should provide arguments, because these are theists who make a claim about reality: “God exists.” On the other hand, atheists do not make a claim about reality; they merely reject the theist claim. The default position of a skeptic and a rational person is, according to the burden-of-proof logic, disbelief in a claim until sufficient evidence is provided.

A common response to this reasoning is that atheists put forward an alternative claim: “God does not exist.” But according to many atheists, this is not the case. The discussion is only about the claim made by theists. For example, a person who has never learnt the notion of a god is also an atheist. Such a person could never make a claim one way or the other. Moreover, when rejecting a claim, you are not making yourself automatically a proponent of an alternative claim. There are things about the Universe that we just simply do not know yet. You cannot be forced to automatically accept a bad claim because you rejected another bad claim. Finally, there are an infinite number of claims that can be made up by a person with good imagination. It is impossible to even name them, let alone produce reliable counterevidence to all of them. Therefore, a default position must be to disbelieve a claim until evidence for it is provided, without being forced to accept an alternative claim in the meantime. The evidence does not have to take a tangible form. It can be in form of sound reasoning or even vague clues in some cases.

Although there are, no doubt, a considerable variety of opinions on this matter, the above explanation more or less summarizes why many atheists think that the burden of proof lies with theists. Some theists try to turn this argument around. They say that atheists are indeed making a claim that “God does not exist.” Also, there is good evidence for their case and there is insufficient evidence for the case of atheists, therefore it is atheists’ turn to argue for themselves. However, these arguments do not go deep enough. In most debates, atheists present much higher level of knowledge and sophistication in their thinking then their adversaries. Since they have hard time arguing otherwise, it may seem that theists are indeed the ones who need to provide justification for their claims and the burden of proof lies with them.

The philosophical questions that are interesting to me are: is burden of proof a valid framework of logical thinking? Will using it improve quality of the inferences we make about reality or should we use a different framework? What different framework would be better? And if burden of proof is the best framework, how to decide who has the burden of proof? Is there a general rule or the rule depends on the situation?

In this essay I indent to answer these questions by picking apart the burden-of-proof logic and by addressing most common arguments supporting it. But before I start this job, let me briefly explain why it should be important to both sides of the debate: application of burden of proof shapes communication between atheists and theists. It generates some confusion and disagreement. It will be hard to come to an agreement if the parties use different logic, and especially hard if the parties use faulty logic. So, whatever side you are on, if you care for the truth to prevail, in your interest is to get both yours and your opponent’s logic straight. 

Decisions matter

Why are the debates between theists and atheists important? Why are debates important in general? The debates I want to discuss in this essay are a way of exchanging information that is supposed to help establish what is the nature of reality. You can have such a debate in your own head when you consider pros and cons of some claims. We can also hold such a debate in public to educate people and show to the undecided which arguments are stronger. Regardless of whether argument goes on in your head or in public, the same logic should govern the reasoning: the correct logic.

Why do we care what the nature of reality is? We care about it because our vision of reality influences our decisions, which in turn reflect on our wellbeing. If somebody harbors in his head a belief that bears no effect on his decision whatsoever, this belief is irrelevant to other people and to the entire outside world. For some people it may be interesting to indulge in “academic discussion” about such beliefs, but for the sake of this argument, I am going to consider only beliefs that influence our decisions.

The theory of decisions under uncertainty

Consider the following scenario: you are speeding on a highway. There is a turn ahead. You are wondering whether there are police waiting behind it. If there are, you are probably going to get a ticket. Now, you have to decide whether to slow down or maintain your speed.

This is a typical problem in which you have to make a decision under uncertainty. You have some prior information about the situation – you have your past experience with police and you have heard many stories. You also know the approximate costs and benefits of each choice: the approximate value of the ticket, the amount of time lost by being pulled over and the amount of time lost by slowing down to avoid the ticket.

So let us apply the burden-of-proof logic to this situation. The default position is disbelief in the claim that police exists until sufficient evidence is provided. And since there is no proof that they are there, the decision should be clearly to keep on speeding. But we know this is a wrong decision under some circumstances, especially if you know that police really like to be there. Either the burden-of-proof logic is not working here or I have misapplied it. You can argue the latter by saying that the claim should be “there is a 10% chance that police is behind the corner.” Your burden of proof is now met by your previous experience with cops but you must have arguments both in favor and against their existence to evaluate the probability.

This is the way we seem to make decisions. We consider alternative versions of reality – in fact cops either are there or they are not. We assign a probability value to each version of reality. Then we think about costs and benefits of our decisions under each version of reality and we choose the option that is best for us. This is how rational decisions are usually modelled in social sciences.

 ‘Wait a minute’ you may think. ‘But many people don’t evaluate probabilities and don’t build a comprehensive cost-benefit analysis when they make decisions!’

That is correct. Many people do not consider consequences of their decisions and do not consider how probable their assumptions are. We call such decisions irrational. In virtually every decision made by humans, there is a component of irrationality. We do not have enough intellectual capacity to process all information efficiently. However, we are quite good at approximating rational decisions even when we do not explicitly think about probabilities. Moreover, it has been proven over and over again that the more irrationality in the decision-making process, the worse the results on average. An agent concerned with her wellbeing must aspire to be as rational as possible. Therefore, I am going to assume that the decisions we discuss are rational.

Consider a different example: a claim that some diseases are caused by germs. Belief in such a claim can yield significant benefits. For example, you can start washing your hands, which can extend your expected life span by a few years. Today people ascribe a very high probability to this claim. But a few centuries ago it did not even occur to them. They were acting as if they assigned zero probability to this claim.

In a rational decision-making process you need to consider alternative versions of reality and assign them probabilities. The version of reality that did not occur to you gets by default probability zero. Being rational means choosing best option given the information you have. Being rational does not depend on the quality of the information you have. If you have insufficient or false information, your decision can still be rational if based solely on this information. People who were not washing their hands were rational, they just had insufficient information.

Let us go back to the question about a god. First, recall that we are interested in decisions and their consequences. Going to church can have different costs and benefits depending on which version of reality is true: “God exists” or “God does not exist.” A rational person concerned with her wellbeing should assign probabilities to both claims and choose the best option. The process of evaluating probabilities requires both arguments against and arguments in favor of existence of a god. If you had arguments for only one side, you would end up with probability 1 or 0. If you had no arguments whatsoever, the probability would be a half for each. 

It is impossible to square the burden-of-proof logic with rational decision making. Evaluating a single claim about the nature of reality in isolation does not make sense because it cannot well translate into a decision. In order to have a decision, you need to evaluate at least two claims and assign them probabilities (keep in mind that probabilities must sum to one). As a result, it turns out that the burden-of-proof logic is useless. 

You can’t prove negative

After establishing that the logic at its core is flawed, I need to debunk examples and lines of reasoning presented by some atheists (and other skeptics) that are built around this logic. The first is the notion that it is impossible to prove negative. As the argument goes, it is inherently hard to prove certain claims false as they are constructed in such a way that they elude counterarguments. An often cited example was coined by Bertrand Russell in 1952: “If I were to suggest that between the Earth and Mars there is a china teapot revolving about the sun in an elliptical orbit, nobody would be able to disprove my assertion provided I were careful to add that the teapot is too small to be revealed even by our most powerful telescopes.”

To break this argument down, consider the following scenario: your five year old kid comes to you, waves his stuffed kangaroo in front of your face and says: ‘Mommy, Timmy says he is hungry and wants you to put some marshmallows in his pouch.’ 

This is a serious decision-making challenge that you are facing now. Any bad decision can have negative consequences. If you do not give Timmy marshmallows, and the claim made by your kid turns out to be true, the poor creature could suffer or even starve, making your child desolate. However, if the claim is false and you donate the marshmallows, they will surely end up in the stomach of your little love, after spending some time in the dirty and hairy interior of Timmy’s pouch. Similar decisions in long run can harm your child’s health and erode your authority.
So what will you do? On one hand you have the child’s testimony. On the other hand you have the following arguments:
  1. The claim is incompatible with scientific worldview. You could dissect Timmy and see inside that there is nothing that could generate human speech.
  2. The general experience is that stuffed animals do not talk. There are no verified examples (except when they are stuffed with electronics, but Timmy is not).
  3. The children at this age tend to make such things up. There is a lot of verified examples of children making claims that turned out to be untrue.
  4. The kid himself may have an interest in making you believe the claim. Certainly, he is projecting his own desires on Timmy, as marshmallows tend to be favorite food of kids, not stuffed kangaroos.
After performing this sophisticated analysis, you may conclude that ‘Well, I cannot prove that Timmy did not say that. I cannot prove negative, therefore I must give marshmallows to Timmy.’

We know however from the previous section that this is faulty reasoning leading to an irrational decision. You cannot evaluate kid’s claim in isolation. You have to evaluate it together with the claim “he made it up” and assign both claims probabilities. In the end, you will most likely assign very high probability to the claim “he made it up” and act accordingly. Maybe Timmy did speak and you may never be one hundred percent sure. But for practical reasons, you have enough evidence to disprove it. The fact that you cannot “positively” prove that Timmy did not speak is irrelevant.

This example is not as ludicrous as it sounds. It is indeed very similar to the main topic of this essay. Note that supernatural religious claims have similar characteristics:
  1. They cannot be explained using known and verified laws of nature.
  2. There are no verified examples of anything supernatural ever happening.
  3. People have a natural tendency to make up supernatural claims.
  4. People often have an interest in persuading you and a tendency to engage in intellectual gymnastics to make their arguments about supernatural look credible.
As a matter of fact, it is often impossible to prove negative beyond any doubt (some people may say that it is impossible to prove positive beyond any doubt too). But for practical reasons it is not necessary. There are often good reasons to believe that the claim was made up and this should be enough to force the person making the claim to produce more compelling evidence. For example, I have good reasons to believe that Bertrand Russell made up the celestial teapot. When forced to make a decision (e.g. make a bet), I will assign very low probability to existence of the teapot unless more compelling argument in favor of it is provided. Mr. Russell seems to be fully aware that this is how it is supposed to be, as after introduction of his example he swiftly adds: “But if I were to go on to say that, since my assertion cannot be disproved, it is intolerable presumption on the part of human reason to doubt it, I should rightly be thought to be talking nonsense.”

In fact, proving negative is very common and one does not have to come up with fancy examples to show it. Proof by contradiction is a valid logical way to prove non-existence of an object. In mathematics, a well-defined object can be tested for consistency of its properties. If the properties are inconsistent, the implication is that the object does not exist. Similarly, an object in physics can have a well-defined and ever-present influence on the environment. The lack of the influence implies that the object does not exist. 

Null hypothesis

I sometimes hear the notion of null hypothesis being brought up in God debates, although the context is never clear enough for me to formulate it. Nevertheless, it does not seem that the notion is used properly, so let me explain what it is about. You can also read more on Wikipedia.

In statistics, a null hypothesis is a set of assumptions about available data. Statisticians use the data to calculate certain value called test statistic (example: sample average). If the assumptions of the null hypothesis are satisfied, then it is mathematically proven that test statistic should have a particular probability distribution. This means that the test statistic is very likely to take on some values and less likely to take on other values (example: your null hypothesis is that man are on average 6 feet tall; it implies that your sample average is not likely to be around 7 feet). If the statistic takes a value that is considered unlikely (your sample average turned out to be 7 feet), it indicates that you should reject the null hypothesis.

However, if your statistic takes on a likely value (your average turns out to be 6.1 feet), it does not mean that you should accept the null hypothesis. Virtually always, there exist multiple different null hypotheses that could all be accepted. Sample size is never big enough to eliminate possibility of unexpected random deviation (even though sample average is 6.1 it may turn out that the true average among all men is 5.9 instead of 6 feet).

Null hypothesis is a tool for proving negative. It is very similar to proof by contradiction. You start with some assumptions. If you end up with a result that is unlikely, your assumptions are likely to be wrong. But having a likely result does not prove the assumptions, because even with different assumptions, you may end up with the same result just by chance.

Gumballs in a jar

Wikipedia contains the following example that explains the burden-of-proof logic: there is a jar with gumballs. The number of gumballs is either even or odd. There are two claims about reality:
  1. Number of gumballs is even.
  2. Number of gumballs is odd.
If we have no information about the number of gumballs, then we have to suspend our belief in both claims until evidence for any of them is provided. This is the default position. End of the example.

The failure of this example is in the fact that it is irrelevant, because there is no decision involved. To fix it, we can add in a decision problem. Let us say that you have to make a guess whether the number is odd or even and if you make a wrong guess (or refuse to guess) you will be shot in the forehead with a Magnum.

Now the situation is quite different. In absolute absence of information about the number of gumballs you will assign each claim a probability of a half and pick at random. If on the other hand there is no evidence except for somebody claiming that the number is even, you will not “disbelieve this person by default until sufficient evidence is provided.” Instead, you will choose “even” as your answer, unless you have reasons to believe that this person may be misleading you. 

Innocent until proven guilty

Another popular example involves analogies to a court case. In this scenario, a claim about the nature of reality is compared to a claim that a person is guilty of murder. The burden of proof lies with the prosecutor to prove the guilt, and judges (or jury, depending on the legal system) have to produce a “guilty” or “not guilty” verdict (rather than “guilty” or “innocent”). “Not guilty” in this case does not mean that the person was determined to be innocent. It only means that there was insufficient evidence to ascertain guilt. In a similar way, the burden of proof should lie with a person making a claim about the nature of reality, and rejection of the claim does not automatically imply acceptance of an alternative claim.

The argument that judges (jury) vote “guilty – not guilty” is a word play. Recall that presumption of innocence is often phrased as “innocent until proven guilty.” To keep the wording consistent with the burden-of-proof logic, it should rather be phrased as “not guilty until proven guilty.” But is it that these words have a deep significance to the logic of the decision-making process? Or is it that they are based in tradition and do not imply anything beyond their literal meaning?

In fact, a court decision is often a good example of how the theory of decisions under uncertainty works. Both sides need to present their arguments. There is both a prosecutor and a defense attorney who present different accounts of the nature of reality. Based on their arguments, court assigns probabilities to both stories. Then, within its legal constraints, court considers costs and benefits of possible decisions it can make. Finally, a ruling takes place.

The presumption of innocence indicates that courts ought to be risk-averse in their rulings. That is, the probability of committing a crime must be way above 50% for a person to be sentenced. This is a reflection of a simple preference of our society: we consider sentencing an innocent person to be a greater injustice than letting a criminal get away with his crimes. This is also valid from practical reasons: the information provided during a trial is hardly ever complete and even judges are not perfectly rational, so we need a great degree of certainty before we let them decide to ruin somebody’s life. The reasons why decision-making process in courts is structured in such a way are thus idiosyncratic. Using court rulings as a model for any decision is simply wrong.

Evidence for claims in science

‘Whenever scientists make a claim, they back it up with evidence. You do not often see scientists making up unbacked theories’ another argument goes.

That is true, a significant part of science is about assessing which claims about reality are true and which are false. For example, the framework of null hypothesis discussed above is a tool of science that serves exactly that purpose. But still, there are reasons why this analogy is wrong.

The concept of a god is not something new that was recently invented by a mad scientist. Theism is the incumbent idea. Similarly, geocentric model of the Universe was the incumbent idea in the medieval times. Are you saying that Copernicus could just have said ‘I do not accept geocentric model of the Universe because it has not met its burden of proof’ and people should have been persuaded? Incumbent ideas usually have some arguments backing them, however flawed. If you want to dismantle an incumbent idea, you must provide new arguments to counter the old ones.

But dismantling an incumbent idea is not enough. People need information about the nature of reality in order to make decisions. If you point out flaws in the only existing theory without providing an alternative one, people have no choice but to still assign this theory probability 100% when they are forced to make decisions. The only way to change that is to introduce an alternative theory. And this new theory will require evidence.

The fact that science focuses so often on single claims rather than decisions has a good reason: efficiency of communication. It is much easier to discuss a single claim about the nature of reality than a decision that entails multiple claims or a single claim in context of all decisions it can be part of. Nevertheless, scientists often provide examples of decisions their work can influence, to show why it is relevant. And new theories hardly ever appear in vacuum. Virtually always, there is some sort of incumbent theory which needs to be replaced. For example, the arguments supporting germ theory were made to convince people whose previous theory was that disease was a punishment from God. To use a familiar analogy: a scientist is like a prosecutor or a defense attorney. It is not their job to make a decision; their job is to provide evidence in favor of their account of the nature of reality. 

Extraordinary claims require extraordinary evidence

For people who believe in a god, it is often as self-evident that their god exists, as it was self-evident to medieval astronomers that the Sun revolved around the Earth. Imagine that you are one of those medieval astronomers. Somebody comes up to you and says that your claim about the Sun revolving around the Earth is extraordinary and you need to produce extraordinary evidence for it, otherwise your claim is unbelievable. This sounds ridiculous. Just look at the Sun.

It is all about perspective. Who decides what claims are extraordinary and what type of evidence is required? Atheists may label theist claims as “extraordinary” but they cannot just impose this labeling on theists and expect them to accept it. If atheists want to have an actual dialog with theists, they need to explain why theist claims should be labeled “extraordinary.” This in turn entails providing and justifying and alternative vision of reality, that is taking on the burden of proof.

There are many claims made by theists that can easily be recognized as extraordinary even by the people who make them. The communication failure happens, when the rule “extraordinary claims require extraordinary evidence” is applied across the board without making sure that the other side agrees with the labeling and with what labels imply. 

The burden of proof

The decision to place the burden of proof on somebody who claims existence is arbitrary. Theists often turn this argument on its head, for example saying that we should then consider a claim that there exists a universe without a god. The typical response from atheists is that it is a cop out. Is it?

As I mentioned before, I consider only relevant questions. Both existence and non-existence of a relevant object have their consequences (if there are no consequences, then the object is irrelevant by definition). The attempts to explain why we should prioritize one of these options over the other are made only with examples of irrelevant objects, such as the celestial teapot orbiting the Sun. To the contrary, people in general seem to be very interested in establishing non-existence of relevant objects, especially if these objects could threaten their wellbeing. Before walking into a gas chamber, which of the following claims would you prefer to be proven: “Zyklon B is in the chamber” or “there is no Zyklon B in the chamber?”

The notion of default position and the burden-of-proof logical framework do not hold up when faced with practical problems. They are flawed and must be discarded. But should we abandon the notion of burden of proof entirely?

Burden of proof can be understood as a communication device. It can imply what the presuppositions are and who should provide the arguments to counter these presuppositions, like in the case of judicial trial. In common discussions, the burden of proof lays often with the person who wants to change beliefs of other people. In general, the burden of proof is most often on the person who challenges the incumbent idea. There is nothing wrong with it. But stating that it should always be applied in this or any other way and making a rule of logic out of it requires justification, not mere assertion. 

Flying Spaghetti Monster

Does it all mean that we have to debunk every possible claim, no matter how ridiculous?

Let us consider the example of the Flying Spaghetti Monster (FSM hereafter). Let us imagine that the question of existence of FSM is relevant, that is our decisions should be based on the true nature of reality, otherwise there is some sort of penalty: you will be sent to FSM’s hell if it does exist and you do not observe prescribed rites or you will be wasting time and being obnoxious if it does not exist and you do observe the rites.

Regardless of whether the decision process happens in your head or whether it is held in a public forum, one of the arguments can be: “FSM does not exist because it seems to be made up by some people in order to troll other people.” An argument in favor of alternative point of view may be: “I had a personal revelation from FSM that he exists.”

A person perceiving such an exchange has to consider both arguments and assign probabilities to corresponding claims. How well a person evaluates the probabilities depends on the qualities of the person, for example how knowledgeable or intelligent she is. If a person comes to a conclusion that the first of the arguments has no merit and the second one is all that is needed, it just means that the person has either no clue how to evaluate evidence or no knowledge about contemporary societies. The discussion with such a person about the claim itself is thus pointless. Instead, this person probably needs to be educated how to evaluate evidence in general, and such a discussion is recommended instead.

On the other hand, a person who knows how to evaluate such arguments will quickly conduct the entire reasoning in her head. It will happen in a split second upon the first time she hears about the FSM. In fact, this happens to most people. The results of this quick reasoning seem so obvious that people often forget the reasoning even took place. So, yes, unfortunately every ridiculous claim needs to be debunked. The good news is that it usually takes less than the time needed to utter it. 

Atheism

Atheism is most often defined as “a lack of belief in gods.” Definitions often underline that it is not “a belief that gods don’t exist.” The practical difference is that the latter definition includes only people who thought about gods and concluded that they did not exist. The former encompasses also people who have never thought about gods because this notion never occurred to them as well as people who thought about gods but decline to provide their stance.

Atheists often complain that people conflate these two definitions. But the source of complaints is oftentimes not that individuals got miscategorized, but because of the definitions’ supposed implications for the burden of proof. In atheist worldview, the former definition shifts the burden of proof to theists. The latter definition indicates that atheists are making a positive claim which would require evidence and would place the burden of proof on them. The question is: why people keep confusing the two definitions?

A typical atheist neither goes to church nor observes other rituals prescribed by religions. Most of the time, atheists know that if the claim about God is correct, their wellbeing is in serious jeopardy. Nevertheless, they keep on behaving as if gods did not exist. Yet they say that they are atheists not because they think that gods do not exist. To the contrary, some of them say that in addition to being atheists, they just happen to believe that gods do not exist.

Consider a rational person deciding whether to go to church. Under the theory of decisions under uncertainty, the person has to assign probabilities to at least two claims and evaluate costs and benefits of the decision under each possible version of reality. Such a person would not go to church only if probability assigned to “God does not exist” is high. Yet some atheists say that they evaluate only the “God exists” claim. They do not assign probability to the claim “God does not exist.” How is that possible? There are a few possible explanations for this paradox:
  1. Atheism is a vapid notion that has no implications on the behavior of people under this label.
  2. Atheists are irrational in their decisions.
  3. Atheists are disingenuous by claiming that they do not hold a certain belief and yet they consistently behave as if they did.
  4. Theory of decision under uncertainty is wrong and cannot be applied to this situation.
Back to the topic: the current definition of atheism focusing on beliefs seems coherent with an alternative definition focused on behavior: “an atheist is a person who behaves as if gods did not exist.” People who consciously call themselves atheists, people who were not exposed to the notion of a god, as well as the “undeclared” tend to behave as if gods did not exist. There seem to be no need to change the definition. What needs to be changed is the silly burden-of-proof logic.

Source of confusion

The entire essay could be probably replaced with a single statement: “the claim that the default position and the burden-of-proof logical frameworks are valid has not met its burden of proof; it should be thus disbelieved by default.” However, as I am challenging an incumbent theory, I feel obliged to provide as good arguments as possible. And arguing for the new theory seems incomplete without speculating why the previous theory was so readily accepted. I consider reasons to be the following: 
  1. It is hard to realize that considering claims in isolation does not make sense. You need to conceptually link up claims with decisions and have a working model of decision making.
  2. A lot of intellectual activity focuses on claims, especially in science. It may seem natural to use claims as a basic unit and consider them in isolation.
  3. It is not in anybody’s interest to voluntarily give up an advantage. Putting the burden of proof on theists is convenient for atheists. Maybe this is why not enough effort has been made by atheists themselves to debunk the burden-of-proof logic.
  4. As Bertrand Russell pointed out, proving objectively non-existence is in some cases impossible, especially if the object in question is irrelevant (that is, it does not have a measurable influence on the people who argue about it). Given the recent tendency of theists to roll back their claims and to make them less and less relevant, it seems natural to demand more evidence supporting such claims.
  5. Some atheist feel like arguing against popular notion of God is similar to arguing against Flying Spaghetti Monster. The idea just seems to them so ridiculous that no arguments against it need to be made – on the contrary, strong arguments must be made to support such an “extraordinary” claim before it is even worth considering.
I hope that by now all these reasons have been cleared.

Consequences of confusion

The last topic I would like to cover is why this is all important.

First of all, using faulty logic is never good. The quality of conclusions that can be drawn from a discussion at hand is not its only victim. Invalid patterns of thinking once adopted by people, can be used in other discussions as well. Therefore, it is not just the conclusions about gods that are at stake, but the entire body of logic and all future conclusions that could be reached for bad reasons.

Second reason is the easily observable failure of communication between atheists and theists. Theists often have hard time trying understanding the argument about burden of proof because it is so unintelligible. The reason for it is not that theists lack intelligence, but that the argument is wrong. As a result, it is much harder to reach an agreement. Theists are left unconvinced that what atheists are saying makes sense and atheists are frustrated that theists do not want to accept their arguments. Such an impasse makes it easier to create hard feelings and makes it less easy to carry out meaningful debate leading to a conclusion. In a nutshell, use of faulty logic can impede propagation of good ideas.

Finally, holding on to the burden-of-proof framework is highly counterproductive from the point of view of atheists themselves. Theists oftentimes leave the discussion with a feeling that atheists are disingenuous. Almost all atheists behave as if they believe that a god does not exist. Yet they keep on saying that it is not their belief. This clear discrepancy between words and actions is easily noticeable and many theists feel perplexed once exposed to it. And they cannot be blamed, if in the end they conclude that atheists are selling them bullshit.

Disclaimer

I use labels “atheists” and “theists” in the context of media personalities who recently dominated public sphere, mostly YouTube, as well as people who respond to these personalities. This essay does not intend to objectively represent views of groups that use mentioned labels but rather addresses some of the arguments made by some people in these groups. 

Saturday, July 18, 2015

Data scraping with C++

Hello. 

My name is CText. I am a C++ class. I can read a text file – usually an HTML or XML file. I can extract a lot of useful information from it. I can find a piece of text enclosed by given strings. I can look for it in a particular line or in the entire file. I can parse tables. I can parse lists. I have worked with various data sources, including Amazon, Christies, EPO, Factiva, and many more. I significantly speed up coding and increase code reliability. Although I am probably not perfectly optimized, I am doing my job well. I have to admit that I have been tested only with Visual C++ on Microsoft Windows. And I require an additional header file to function. But I still hope I can be useful. The following program illustrates my capabilities. The program
  1. downloads the GDP data from the World Bank website,
  2. converts the GDP data and saves it to a CSV file,
  3. finds the first line of the table in the file and displays this line, and
  4. retrieves the list of the countries and displays it.
Sample code

Download the source code or copy and paste it:

#include <iostream>
#include <andatathresher.h>

using namespace std;

int main()
{
cout << "Hello World!" << endl;
download("http://data.worldbank.org/indicator/NY.GDP.MKTP.CD", 
"file.html");
CText txt("file.html");
CCSV csv;
csv.data = txt.parsetable(0);
csv.savetofile("gdp.csv");
int line = txt.findline("<table");
cout << "The line containing first \"table\" has the number " 
<< line << " and its contents is: " << endl << txt.line(line) 
<< endl;
vector<string> ctrs = txt.selectiveharvest("Country name", 
"</table>", "<tr", "</tr>", "<a href", ">", "<");
cout << "Here is the list of countries covered:" << endl;
for (int i = 0; i < ctrs.size() - 1; i++) 
cout << ctrs[i] << "; ";
if (ctrs.size()>0) cout << ctrs[ctrs.size() - 1] << endl;
system("pause");
return 0;
}

Class members

string content
A field with the content of the file.

vector<int> separators
A field that contains positions of new line characters in the file.

CText::CText(const string &fname)
A class constructor. Loads a file and performs its preliminary analysis. A constructor without parameters can be called as well and file can be loaded manually but one has to be careful about functions using lines.  

bool CText::load(const string &filename)
This function loads a file with a given file name, stores its content in the field content, and performs its primary analysis. Returns true upon success and false otherwise.

void CText::update()
A method performing preliminary analysis of the file. It updates the separators vector.

int CText::findline(const string &text, int pos = 0)
This function returns the number of the first line that contains given string. It starts searching in the file from the offset pos. Returns -1 if no line is found.

int CText::findinline(string &res, int line, const string &before, const string &after)
This function extracts a string from a line with the line number given by line. The string that is directly after before and before after is returned through reference res. The function returns offset of the found string or -1 if it cannot be found.

int CText::findafter(string &res, const string &prefix, const string &before, const string &after, int pos = 0)
This function extracts a string from a file. It starts searching from the offset pos. It looks for the first subsequent occurrence of prefix and then for the first subsequent occurrence of before. The string that is directly after before and before after is returned through reference res. The function returns offset of the found string or -1 if it cannot be found.

int CText::findbetween(string &res, const string &before, const string &after, int pos = 0)
This function acts as findafter but with an empty string in prefix.

int CText::geturl(string &res, const string &pattern)
This function looks for a line that contains string pattern. Then it searcher for the first href HTML attribute it can find and returns its content trough reference res. The function returns offset of the found string or -1 if it cannot be found.

string CText::line(int index)
This function returns line from the file with the line number given by index. Lines are numbered from 0.

vector<string> CText::harvest(const string &ldelimit, const string &udelimit, const string &prefix, const string &before, const string &after)
This function acts as selectiveharves but with empty strings in starter and stopper. That is, it operates on the entire file.

vector<string> CText::selectiveharvest(const string& starter, const string& stopper, const string &ldelimit, const string &udelimit, const string &prefix, const string &before, const string &after)
This functions locates all strings that satisfy some criteria and returns them as a vector. It operates only on the fragment of the file that is after first occurrence of starter and before first subsequent occurrence of stopper. Within this range function looks for pieces of text enclosed by ldelimit and udelimit. Each such enclosure is supposed to produce one element of the resulting vector. Within each enclosure, function performs procedure similar to findafter and adds the result as an element to the resulting vector.

int CText::occurencies(const string& text)
This function counts how many times given string can be found in the file.

vector<TDataRec> CText::parsetable(int pos)
This function parses an HTML table and returns it as a vector of vectors of strings. It looks for the first table after offset pos. It will not work for tables inside tables. For the definition of TDataRec type see file anutil.h.

Class code

Download the source code or copy and paste it:

#pragma once

#include <string>
#include <vector>
#include "anutil.h"
#include <algorithm>

using namespace std;

/* INTERFACE */

class CText {
public:
string content;
vector<int> separators;
CText() {};
CText(const string &fname);
void update();
bool load(const string &filename);
int findline(const string &text, int pos);
int findinline(string &res, int line, 
const string &before, const string &after);
int findafter(string &res, const string &prefix, 
const string &before, const string &after, int pos);
int findbetween(string &res, const string &before, 
const string &after, int pos);
int geturl(string &res, const string &pattern);
vector<string> harvest(const string &ldelimit, 
const string &udelimit, const string &prefix, 
const string &before, const string &after);
vector<string> selectiveharvest(const string &starter, 
const string &stopper, const string &ldelimit, 
const string &udelimit, const string &prefix, 
const string &before, const string &after);
string line(int index);
int occurencies(const string &text);
vector<TDataRec> parsetable(int pos);
};

/* IMPLEMENTATION */

CText::CText(const string &fname)
{
load(fname);
}

void CText::update()
{
separators.clear();
for (int i=0;i<content.length();i++) 
if (content[i]=='\n') separators.push_back(i);
separators.push_back(content.length());
}

bool CText::load(const string &filename)
{
ifstream infile;
infile.open(filename,ios::binary);
if (!infile.is_open())
{
content = "";
return false;
}
stringstream cont;
string line;
while (!infile.eof())
{
getline(infile,line);
cont << line << endl;
}
content = cont.str();
infile.close();
update();
return true;

int CText::findline(const string &text, int pos = 0)
{
if (separators.size()==0) return -1;
int k = content.find(text,pos);
if (k<0) return -1;
int i; 
for (i=separators.size()-1; i>=0; i--) 
if (separators[i]<k) break;
return i+1;
}

int CText::findinline(string &res, int line, 
const string &before, const string &after)
{
int start = content.find(before,separators[line]);
int stop = content.find(after,start+before.length());
if ((start<0) || (stop<0)) return -1;
if (line+1<separators.size()) if ((start>separators[line+1]) 
|| (stop>separators[line+1])) return -1;
int pos = start + before.length();
res = content.substr(pos,stop-pos);
return pos;
}

int CText::findafter(string &res, const string &prefix, 
const string &before, const string &after, int pos = 0)
{
int k1 = content.find(prefix,pos);
if (k1<0) return -1;
int k2 = content.find(before,k1+prefix.length());
if (k2<0) return -1;
int k3 = content.find(after,k2+before.length());
if (k3<0) return -1;
pos = k2 + before.length();
res = content.substr(pos,k3-pos);
return pos;
}

int CText::findbetween(string &res, const string &before, 
const string &after, int pos = 0)
{
return findafter(res,"",before,after,pos);
}

int CText::geturl(string &res, const string &pattern)
{
int line = findline(pattern);
if (line<0) return -1;
int pos = findinline(res,line,"href=\"","\"");
return pos;
}

string CText::line(int index)
{
int start;
if (index==0) start = 0; else start = separators[index-1]+1;
int stop = separators[index];
return content.substr(start,stop-start);
}

vector<string> CText::harvest(const string &ldelimit, const string &udelimit, 
const string &prefix, const string &before, const string &after)
{
return selectiveharvest("","",ldelimit,udelimit,prefix,before,after);
}

vector<string> CText::selectiveharvest(const string& starter, 
const string& stopper, const string &ldelimit, const string &udelimit, 
const string &prefix, const string &before, const string &after)
{
vector<string> res;
int beginning;
if (starter=="") beginning = 0; else beginning = content.find(starter);
if (beginning<0) return res;
int finish;
if (stopper=="") finish = content.length(); 
else finish = content.find(stopper,beginning);
if (finish<0) finish = content.length();
int start = content.find(ldelimit,beginning);
if (start<0) return res;
int stop = content.find(udelimit,start);
while ((stop>=0) && (start<finish))
{
string item;
int q = findafter(item,prefix,before,after,start);
if (q>stop) item="";
res.push_back(item);
start = content.find(ldelimit,stop);
if (start<0) return res;
stop = content.find(udelimit,start);
}
return res;
}

int CText::occurencies(const string& text)
{
if (text=="") return 0;
int count = 0;
int pos = 0;
int k = content.find(text);
while (k>=0)
{
count++;
pos = k+1;
k = content.find(text,pos);
}
return count;
}

vector<TDataRec> CText::parsetable(int pos)
{
vector<TDataRec> res;
string temp = content;
transform(temp.begin(),temp.end(),temp.begin(),toupper);
int p1 = temp.find("<TABLE",pos+1);
if (p1<0) return res;
int p2 = temp.find("</TABLE",p1+1);
if (p2<0) return res;
int p3 = temp.find("<TR",p1+1);
while ((p3>=0) && (p3<p2))
{
int p4 = temp.find("</TR",p3+1);
TDataRec row;
int p5 = temp.find("<T",p3+1);
while ((p5>=0) && (p5<p4))
{
int p6 = temp.find(">",p5+1)+1;
int p7 = temp.find("</",p6+1);
string cell = htmltostring(content.substr(p6,p7-p6));
row.push_back(cell);
p5 = temp.find("<T",p7+1);
}
res.push_back(row);
p3 = temp.find("<TR",p4+1);
}
return res;
}

Let me know your experience!

Alien invasion

‘Yes, my little fish. What is your worry?’ said papa fish folding newspaper.

‘Is there life outside the Pond?’ asked little fish.

‘There probably is. The Universe is very big... And it seems to be made out of things we are made of. So extra-pondial life is very likely to exist somewhere’ explained papa fish. ‘In fact’ he continued ‘we know that there are other ponds out there similar to ours. We have already found some.’

‘Has anybody gone there?’ asked little fish.

‘We don't have the technology yet. We have some flying fish which can jump out of water for a few seconds, but to go to a different pond… it's much more complicated.’

‘So how could life look like in these different ponds?’ little fish kept inquisitive.

‘Oh, there is actually something that we can expect. There are features of animals here in the Pond that evolved separately multiple times and seem to be quite useful. We can expect that things like gills and fins are likely to evolve in a different pond as well. Of course, it is silly to depict aleins as fish-morphic creatures as they often are in the movies. Look for example how different octopi are from us. But they have gills too.’ 

‘Hm…’ little fish was thinking for a while. ‘When we meet them, will these aliens be friendly or hostile? Will they try to conquer the Pond?’

‘We can't be sure. But I believe they will be friendly. We can exchange technology. And there is a plenty of uninhabited ponds. Why would they need ours?’

After the conversation, little fish went to bed. Unfortunately, it was the last conversation he had with papa fish. Little they knew that as they spoke a band of humans rolled out their camping site next to the Pond. Next day, early in the morning, one of the humans cast a net and caught both little fish and papa fish, as well as a few others. It took them 20 minutes to die a painful death of suffocation in a fisherman’s bucket. And then they were grilled and eaten.

It is interesting to imagine how  extraterrestrial life would look like. Finding even simple life would have great philosophical and scientific implications. But finding extraterrestrial intelligence is especially interesting. We could learn a lot about ourselves just by observing other intelligence. Many things we take as general truths could turn out to be products of our minds. Also, if alien intelligence shows up somewhere close by, we may end up competing with them for resources. And if they are technologically superior, then we are screwed. So let us see what top scientific minds can say about how aliens would look like and how our encounter with them could unfold:
I am still very disappointed by anthropomorphism and "biomorphism" of the creatures they are discussing (maybe except for the last one). I want to strip these visions from their biases and make them as realistic as possible. Although, I may identify some shortcomings but my thinking will be still preconditioned by the experience of Earthly life. Therefore, all I hope to achieve is to make an incremental improvement and pass the work on to somebody who will identify the biases I overlooked. We deserve better aliens!

Meet a planet-eater

I present you a planet-eater. This creature is a sphere, similar in size of the Imperial Death Star (160 kilometers/100 miles in diameter) and weights around 5 thousand trillion tons. It has a thick shell that along with self-generated magnetic and electric fields protect the interior from cosmic radiation and other dangers. The shell is able to withstand a high-yield nuclear blast, as it is at least 20 kilometers (12 miles) thick. The bowels of the creature contain among others resource silos as well as mechanical and chemical plants that allow the planet-eater to create any device it needs. It is also equipped with a fission and fusion cores that allow morphing some elements into others.

The propulsion systems are built as they are needed. They attach themselves to the creature’s surface and operate as long as necessary. Then, they are hauled back inside where they are disassembled. The internal factories are also able to manufacture probes, communication devices, smaller crafts able to capture and haul asteroids or comets, repair robots, defense drones, exterior silos, and so on. The list of blueprints includes everything that is needed to be self-sufficient in the interstellar space. More devices can be designed on the spot as needed.

The creature can equip itself with a multitude of sensors. Data from these sensors are analyzed by an on-board supercomputer whose intelligence is orders of magnitude higher than the total intelligence of all humans who ever lived combined. The volume of the central unit is around two cubic kilometers (0.8 cubic miles) and weights 4 billion tons. The supercomputer has access to sensors inside the creature’s body. It also monitors itself, thus meeting all necessary conditions for being self-conscious.

Planet-eaters are semi-social species. It is hard to make a random encounter in the interstellar space and if one happens, the help usually arrives no sooner that after a few years. Each planet-eater is thus equipped to do well on its own. However, whenever two planet-eaters meet, they quickly exchange information they accumulated about the Universe and work together to see if they can improve their blueprints or even totally redesign themselves. They can work together to fend off enemies or solve problems one planet-eater could not deal with on its own. There have been even cases of self-sacrifice. Their social interactions can get very complicated and are intractable for a simple human brain.

Planet-eaters are very rational when it comes to interaction with other species. As with everything else, the decision on how to interact is based on cold calculation of costs and benefits. Unfortunately, less advanced creatures usually have nothing to offer them. They are at best ignored. Higher creatures on the other hand, would be valuable partners but they in turn are not interested in partnerships. Some of them just ignore planet-eaters; others use them as their food.

In fact, planet-eaters are one of the most primitive inhabitants of the Universe. They feed on primordial matter so they will run their course as soon as they eat up everything. They are small, week, and stupid as compared to other aliens, like algae are small, week, and stupid as compared to a whale. Finally, their ecological niche is small. The planets, asteroids, and dust clouds on which they can feed constitute just 1% of the Universe matter. The rest is contained in stars and other supermassive objects.

They are certainly dwarfed by their more advanced cousins: star-eaters (you may not realize that dark matter consists mostly of stars currently being consumed by star-eaters). But their evolutionary advantage is that they can multiply quickly, and they move relatively fast, so they can reach distant places before other life forms. In fact, they are already present in the Milky Way, and a number of planet-eaters are currently headed towards the Earth (as well as several other adjacent solar systems). The first three planet-eaters traveling together should enter our solar system within 15 thousand year. Others will come soon after.

Upon their arrival, planet-eaters will send probes to analyze contents of our solar system and to plan how to use its matter most efficiently. Running back and forth through the Solar System is not an easy due to the Sun’s gravity. The routs must be carefully planned to minimize energy expenditure.
As they approach our solar system, the planet-eaters will soon realize that there is something unusual going on in it. Namely, they will detect human activity. They will send probes to examine us. Initially, the probes will be orbiting from afar objects like Venus, the Earth, the Moon, Mars, Ceres, IO, Callisto, and Titan, that is all places with our significant presence.

They will intercept a lot of communication between us. These pieces of intelligence will allow the invaders, still undetected by us, to land some probes on the Earth and other celestial bodies colonized by us. Maybe a few abductions will take place (but bodies will be discarded rather than returned). Learning how we communicate will not be hard, and after connecting to the Internet, they will know about us everything they need to know. Obviously, they will learn nothing from us in terms of science. The most important thing to learn will be that we will defend the rocks we inhabit using all measures available to us, including nuclear weapons. We will be like insects crawling over a fruit and stinging anybody who wants to pick it up. No hard feelings, but you don’t want to be stung while eating, right?

While still in the outskirts of our solar system, the planet-eaters will start to feed on rocks from the Kuiper belt in order to prepare the invasion. After three dozen years of such preparations, the attacks will occur simultaneously in all major population centers. Every celestial body will have a form of attack most efficient for its circumstances. For example, the Earth will have its atmosphere poisoned in such a way that most biological life will go extinct within hours. Some facilities on the Moon will be nuked. Titan will have its atmosphere heated so much that all human installations there will get vaporized. And so on. There will be no need to engage in inefficient direct combat. Why would you sting insects back if you can just blow them off?

In a few hours, human civilization will be reduced to rubble. Only people in most remote space stations will survive. They will live not because they will have been overlooked or because planet-eaters have mercy. They will live because they pose no obstacle to further exploitation of the Solar System and there is no point in wasting energy on killing them.

No sooner than after several years the survivors will start to partially understand what happened to their civilization and who the adversaries are. But with limited spare parts and destroyed manufacturing capabilities, the last humans will die three centuries after initial attack. And the only reason to be proud of ourselves will be these three dozens years it took to prepare the alien invasion. If we were less advanced, say at the ninetieth century level, they would simply ignore our existence and accidentally vaporize us here and there and then leave the rest to freeze and suffocate. But the result will be similar. Even with all this advanced technology, the last future human will freeze to death in a leaking undersurface base on Iris.

By then, the planet-eaters will be busy consuming the planets of our solar system. There is no need to hurry – planet-eaters are usually safe during the feast. It is unlikely that a threatening object would suddenly appear in their vicinity, because flying even from the closest star would take at least four years. And communication with neighboring systems will be indicating that the area is safe.

A contingent of harvesters manufactured in the belly of one of the planet-eaters will land on the surface of the Earth. The machines will gather resources and fly back to their master to replenish contents of its resource silos. And while the planet-eater on the Earth’s orbit will be busy manufacturing new minions, the robots on the Earth will start the slow process of transforming Earth’s matter into bodies of new planet-eaters. It will take long, as it will require cooling down the Earth’s core (all this iron and uranium are especially valuable). But in the end, over hundred thousand copies will be produced and only debris floating on the former Earth’s orbit will be left. In total, the materials in the Solar System will be enough to create over a million of fully functional and independent copies of planet-eaters. The entire process will take around twenty thousand years. Then, the last planet-eater will fly away, leaving the lone Sun behind. Star-eaters will come twelve millions years later.

A case for planet-eaters

Are we likely to encounter creatures like intelligent humanoids or even spider-like aliens with silicon-based biology? We tend to create our aliens in our own image. And we tend to create invasion scenarios in a way we would probably invade. But we are in a short transitory state of technological and intellectual progress. We are unlikely to stay this way for long and it is unlikely that we will meet aliens resembling us, as we are right now. Aliens may be billions of years of evolution ahead. They will have been flying in space for billions of years. I expect a creature flying in space for that long to actually evolve capability to fly in space. Analogically, you would not expect terrestrial animals to carry around a bubble of water so that they can breathe with their gills.

But creation of first planet-eaters may be much quicker than billions of years. The idea of self-replicating robots is not hard to come by in science fiction. Add ability to travel in space and superintelligence and you get a proto-planet-eater. It is likely that some earthling engineer will eventually construct such a thing... that is, if we survive long enough. 

The video by Kurz Gesagt is so good that I will address is separately. Many of their ideas resonate with me. However, self-replicating nanobots do not seem very likely to fare well on their own. They must be organized into a higher being. Otherwise, superintelligence is out of question. Without intelligence, they will lack adaptability and could be easily defeated by something with intelligence. Also, populating virtual world in a cozy neighborhood of a red dwarf may be fun until a technologically superior star-eater comes along. Reality check. 

The key to thinking about aliens are evolution and natural selection. The species that survives is the species that is best at acquiring resources and making copies of themselves (or growing). Being intelligent and having advanced civilization is a tool to improve this feature rather than impede it. People sometimes feel noble as they try to protect the environment and other species from extinction. Then, they think that the progress of our civilization will eventually lead to the ultimate intra-special altruism and they project this notion on their imaginary advanced alien species. This is laughable. Don’t call yourself noble after giving to others some not-so-useful scraps. Call yourself noble only after you restrict your population growth so that there are more resources for other species. And even then, do not expect intelligent aliens to do the same. Such an act of altruism is an evolutionary disadvantage if you are competing with a different species for resources. On the Earth we no longer compete, so we indulge in self-apotheosis.

We humans tend to keep our heads in the heavens. But if we ever meet intelligent aliens, we will be brought down to earth rather quickly.