Here is a cutdown of two of the greatest papers written by Charles Sanders Peirce, removing a few digressions whilst retaining the essential shape of the argument.

§5. 374. The irritation of doubt causes a struggle to attain a state of belief. I shall term this struggle Inquiry, though it must be admitted that this is sometimes not a very apt designation.

The sole object of inquiry is the settlement of opinion…. as soon as a firm belief is reached we are entirely satisfied, whether the belief be true or false.

§5.375 That the settlement of opinion is the sole end of inquiry is a very important proposition. It sweeps away, at once, various vague and erroneous conceptions of proof.

§5.376 the mere putting of a proposition into the interrogative form does not stimulate the mind to any struggle after belief. There must be a real and living doubt, and without this all discussion is idle.

§5.379 the problem becomes how to fix belief, not in the individual merely, but in the community.

There are three methods:

1. The method of authority
§5.379 This method has, from the earliest times, been one of the chief means of upholding correct theological and political doctrines, and of preserving their universal or catholic character….wherever there is a priesthood -- and no religion has been without one -- this method has been more or less made use of…. Wherever there is an aristocracy, or a guild, or any association of a class of men whose interests depend, or are supposed to depend, on certain propositions, there will be inevitably found some traces of this natural product of social feeling. Cruelties always accompany this system; and when it is consistently carried out, they become atrocities of the most horrible kind in the eyes of any rational man….§5.380 It has over and over again worked the most majestic results. The mere structures of stone which it has caused to be put together -- in Siam, for example, in Egypt, and in Europe -- have many of them a sublimity hardly more than rivaled by the greatest works of Nature. And, except the geological epochs, there are no periods of time so vast as those which are measured by some of these organized faiths

2. The method of belief (or what Peirce calls the priori method)

§5.383 This method resembles [the way in which] conceptions
of art have been brought to maturity. Systems of this sort have not usually
rested upon any observed facts, at least not in any great degree. They have been
chiefly adopted because their fundamental propositions seemed "agreeable to
reason." This is an apt expression; it does not mean that which agrees with
experience, but that which we find ourselves inclined to believe. Plato, for
example, finds it agreeable to reason that the distances of the celestial spheres
from one another should be proportional to the different lengths of strings which
produce harmonious chords. Many philosophers have been led to their main
conclusions by considerations like this. ... This method is far more intellectual and respectable from the point of view of reason … It makes of inquiry something similar to the development of taste; but taste, unfortunately, is always more or less a matter of fashion, and accordingly metaphysicians have never come to any fixed agreement, but the pendulum has swung backward and forward between a more material and a more spiritual philosophy, from the earliest times to the latest….not usually rested upon any observed facts… fundamental propositions seemed "agreeable to reason."

3. The scientific method
§5.384. To satisfy our doubts, therefore, it is necessary that a method should be found by which our beliefs may be determined by nothing human, but by some external permanency -- by something upon which our thinking has no effect. It must be something which affects, or might affect, every man. And, though these affections are necessarily as various as are individual conditions, yet the method must be such that the ultimate conclusion of every man shall be the same. Such is the method of science. Its fundamental hypothesis, restated in more familiar language, is this: There are Real things, whose characters are entirely independent of our opinions about them; those Reals affect our senses according to regular laws, and, though our sensations are as different as are our relations to the objects, yet, by taking advantage of the laws of perception, we can ascertain by reasoning how things really and †3 truly †4 are; and any man, if he have sufficient experience and he reasons enough about it, will be led to the one True conclusion.

Q It may be asked how I know that there are any Reals.

A If investigation cannot be regarded as proving that there are Real things, it at least does not lead to a contrary conclusion; but the method and the conception on which it is based remain ever in harmony.

§5.365
I may start with known and observed facts to proceed to the unknown; and yet the rules which I follow in doing so may not be such as investigation would approve. The test of whether I am truly following the method is not an immediate appeal to my feelings and purposes, but, on the contrary, itself involves the application of the method. Hence it is that bad reasoning as well as good reasoning is possible; and this fact is the foundation of the practical side of logic.

§5. 394. The principles set forth in the first part of this essay lead, at once, to a method of reaching a clearness of thought of higher grade than the "distinctness" of the logicians. It was there noticed that the action of thought is excited by the irritation of doubt, and ceases when belief is attained; so that the production of belief is the sole function of thought

Images pass rapidly through consciousness, one incessantly melting into another, until at last, when all is over -- it may be in a fraction of a second, in an hour, or after long years -- we find ourselves decided as to how we should act under such circumstances as those which occasioned our hesitation. In other words, we have attained belief.

§5.395. In this process we observe two sorts of elements of consciousness, the distinction between which may best be made clear by means of an illustration. In a piece of music there are the separate notes, and there is the air. A single tone may be prolonged for an hour or a day, and it exists as perfectly in each second of that time as in the whole taken together; so that, as long as it is sounding, it might be present to a sense from which everything in the past was as completely absent as the future itself. But it is different with the air, the performance of which occupies a certain time, during the portions of which only portions of it are played. It consists in an orderliness in the succession of sounds which strike the ear at different times; and to perceive it there must be some continuity of consciousness which makes the events of a lapse of time present to us. We certainly only perceive the air by hearing the separate notes; yet we cannot be said to directly hear it, for we hear only what is present at the instant, and an orderliness of succession cannot exist in an instant. These two sorts of objects, what we are immediately conscious of and what we are mediately conscious of, are found in all consciousness. Some elements (the sensations) are completely present at every instant so long as they last, while others (like thought) are actions having beginning, middle, and end, and consist in a congruence in the succession of sensations which flow through the mind. They cannot be immediately present to us, but must cover some portion of the past or future. Thought is a thread of melody running through the succession of our sensations.

§5. 396. We may add that just as a piece of music may be written in parts, each part having its own air, so various systems of relationship of succession subsist together between the same sensations. These different systems are distinguished by having different motives, ideas, or functions. Thought is only one such system, for its sole motive, idea, and function is to produce belief, and whatever does not concern that purpose belongs to some other system of relations…. the soul and meaning of thought, abstracted from the other elements which accompany it, though it may be voluntarily thwarted, can never be made to direct itself toward anything but the production of belief. Thought in action has for its only possible motive the attainment of thought at rest; and whatever does not refer to belief is no part of the thought itself.

§5. 397. And what, then, is belief? It is the demi-cadence which closes a musical phrase in the symphony of our intellectual life. We have seen that it has just three properties: First, it is something that we are aware of; second, it appeases the irritation of doubt; and, third, it involves the establishment in our nature of a rule of action, or, say for short, a habit…. belief is a rule for action, the application of which involves further doubt and further thought, at the same time that it is a stopping-place, it is also a new starting-place for thought. The final upshot of thinking is the exercise of volition, and of this thought no longer forms a part; but belief is only a stadium of mental action, an effect upon our nature due to thought, which will influence future thinking.

§5. 398. The essence of belief is the establishment of a habit; and different beliefs are distinguished by the different modes of action to which they give rise. If beliefs do not differ in this respect, if they appease the same doubt by producing the same rule of action, then no mere differences in the manner of consciousness of them can make them different beliefs, any more than playing a tune in different keys is playing different tunes. Imaginary distinctions are often drawn between beliefs which differ only in their mode of expression; -- the wrangling which ensues is real enough, however. To believe that any objects are arranged among themselves and to believe that they are arranged, are one and the same belief; yet it is conceivable that a man should assert one proposition and deny the other. Such false distinctions do as much harm as the confusion of beliefs really different, and are among the pitfalls of which we ought constantly to beware, especially when we are upon metaphysical ground.

§5.399 thought is an action, and that it consists in a relation, although a person performs an action but not a relation, which can only be the result of an action, yet there was no inconsistency in what I said.

§5.400 the whole function of thought is to produce habits of action… whatever there is connected with a thought, but irrelevant to its purpose, is an accretion to it, but no part of it.

If there be a unity among our sensations which has no reference to how we shall act on a given occasion, as when we listen to a piece of music, why we do not call that thinking. To develop its meaning, we have, therefore, simply to determine what habits it produces, for what a thing means is simply what habits it involves.

Now, the identity of a habit depends on how it might lead us to act, not merely under such circumstances as are likely to arise, but under such as might possibly occur, no matter how improbable they may be. What the habit is depends on when and how it causes us to act.

What the habit is depends on when and how it causes us to act.
As for the when, every stimulus to action is derived from perception; as for the how, every purpose of action is to produce some sensible result. Thus, we come down to what is tangible and conceivably practical, as the root of every real distinction of thought, no matter how subtile it may be; and there is no distinction of meaning so fine as to consist in anything but a possible difference of practice.

§5.401 how impossible it is that we should have an idea in our minds which relates to anything but conceived sensible effects of things. Our idea of anything is our idea of its sensible effects; and if we fancy that we have any other we deceive ourselves, and mistake a mere sensation accompanying the thought for a part of the thought itself.

It is absurd to say that thought has any meaning unrelated to its only function

§5.402 The rule for attaining the third grade of clearness of apprehension is as follows: Consider what effects, that might conceivably have practical bearings, we conceive the object of our conception to have. Then, our conception of these effects is the whole of our conception of the object.

§5. 403. Let us illustrate this rule by some examples; and, to begin with the simplest one possible, let us ask what we mean by calling a thing hard. Evidently that it will not be scratched by many other substances. The whole conception of this quality, as of every other, lies in its conceived effects. There is absolutely no difference between a hard thing and a soft thing so long as they are not brought to the test.

[We may] ask what prevents us from saying that all hard bodies remain perfectly soft until they are touched, when their hardness increases with the pressure until they are scratched. Reflection will show that the reply is this: there would be no falsity in such modes of speech. They would involve a modification of our present usage of speech with regard to the words hard and soft, but not of their meanings. For they represent no fact to be different from what it is; only they involve arrangements of facts which would be exceedingly maladroit.

[This] is not a question of fact, but only of the most perspicuous arrangement of them.

For example, the question of free-will and fate in its simplest form, stripped of verbiage, is something like this: I have done something of which I am ashamed; could I, by an effort of the will, have resisted the temptation, and done otherwise?

The philosophical reply is, that this is not a question of fact, but only of the arrangement of facts. Arranging them so as to exhibit what is particularly pertinent to my question -- namely, that I ought to blame myself for having done wrong -- it is perfectly true to say that, if I had willed to do otherwise than I did, I should have done otherwise. On the other hand, arranging the facts so as to exhibit another important consideration, it is equally true that, when a temptation has once been allowed to work, it will, if it has a certain force, produce its effect, let me struggle how I may.

Many questions are involved in the free-will discussion, and I am far from desiring to say that both sides are equally right. On the contrary, I am of opinion that one side denies important facts, and that the other does not. But what I do say is, that the above single question was the origin of the whole doubt; that, had it not been for this question, the controversy would never have arisen; and that this question is perfectly solved in the manner which I have indicated.

There is no objection to a contradiction in what would result from a false supposition. The reductio ad absurdum consists in showing that contradictory results would follow from a hypothesis which is consequently judged to be false.

§5.404 the idea of Force in general.
This is the great conception which, developed in the early part of the seventeenth century from the rude idea of a cause, and constantly improved upon since, has shown us how to explain all the changes of motion which bodies experience, and how to think about all physical phenomena; which has given birth to modern science, and changed the face of the globe; and which, aside from its more special uses, has played a principal part in directing the course of modern thought, and in furthering modern social development.

§5.404 The idea which the word force excites in our minds has no other function than to affect our actions, and these actions can have no reference to force otherwise than through its effects. Consequently, if we know what the effects of force are, we are acquainted with every fact which is implied in saying that a force exists, and there is nothing more to know.

§5. 405. Let us now approach the subject of logic, and consider a conception which particularly concerns it, that of reality.

A definition may perhaps be reached by considering the points of difference between reality and its opposite, fiction.

A figment is a product of somebody's imagination; it has such characters as his thought impresses upon it. That those characters are independent of how you or I think is an external reality. There are, however, phenomena within our own minds, dependent upon our thought, which are at the same time real in the sense that we really think them. But though their characters depend on how we think, they do not depend on what we think those characters to be. Thus, a dream has a real existence as a mental phenomenon, if somebody has really dreamt it; that he dreamt so and so, does not depend on what anybody thinks was dreamt, but is completely independent of all opinion on the subject. On the other hand, considering, not the fact of dreaming, but the thing dreamt, it retains its peculiarities by virtue of no other fact than that it was dreamt to possess them.

Thus we may define the real as that whose characters are independent of what anybody may think them to be.

§5.406 it would be a great mistake to suppose that it makes the idea of reality perfectly clear... reality, like every other quality, consists in the peculiar sensible effects which things partaking of it produce. The only effect which real things have is to cause belief, for all the sensations which they excite emerge into consciousness in the form of beliefs. The question therefore is, how is true belief (or belief in the real) distinguished from false belief (or belief in fiction).

The ideas of truth and falsehood, in their full development, appertain exclusively to the experiential method of settling opinion.

§5.407 all the followers of science are animated by a cheerful hope that the processes of investigation, if only pushed far enough, will give one certain solution to each question to which they apply it

Different methods… may at first obtain different results, but, as each perfects his method and his processes, the results are found to move †4 steadily together toward a destined centre. So with all scientific research. Different minds may set out with the most antagonistic views, but the progress of investigation carries them by a force outside of themselves to one and the same conclusion.

This activity of thought by which we are carried, not where we wish, but to a foreordained goal, is like the operation of destiny. No modification of the point of view taken, no selection of other facts for study, no natural bent of mind even, can enable a man to escape the predestinate opinion.

This great hope is embodied in the conception of truth and reality. The opinion which is fated to be ultimately agreed to by all who investigate, is what we mean by the truth, and the object represented in this opinion is the real. That is the way I would explain reality.

§5.408 But it may be said that this view is directly opposed to the abstract definition which we have given of reality, inasmuch as it makes the characters of the real depend on what is ultimately thought about them.

But the answer to this is that, on the one hand, reality is independent, not necessarily of thought in general, but only of what you or I or any finite number of men may think about it; and that, on the other hand, though the object of the final opinion depends on what that opinion is, yet what that opinion is does not depend on what you or I or any man thinks.

Our perversity and that of others may indefinitely postpone the settlement of opinion; it might even conceivably cause an arbitrary proposition to be universally accepted as long as the human race should last. Yet even that would not change the nature of the belief, which alone could be the result of investigation carried sufficiently far; and if, after the extinction of our race, another should arise with faculties and disposition for investigation, that true opinion must be the one to which they would ultimately come.

The opinion which would finally result from investigation does not depend on how anybody may actually think. But the reality of that which is real does depend on the real fact that investigation is destined to lead, at last, if continued long enough, to a belief in it.

§5.409 Do these things not really exist because they are hopelessly beyond the reach of our knowledge? To this I reply that, though in no possible state of knowledge can any number be great enough to express the relation between the amount of what rests unknown to the amount of the known, yet it is unphilosophical to suppose that, with regard to any given question (which has any clear meaning), investigation would not bring forth a solution of it, if it were carried far enough.

5410 It is certainly important to know how to make our ideas clear, but they may be ever so clear without being true.