Open Side Menu Go to the Top
Register
durkadurka, you only believe in free will because....(LC) durkadurka, you only believe in free will because....(LC)

06-29-2010 , 07:54 AM
I don't think that people realize how much philosophy actually influences broader social patterns and the development of thought over time. It may not be immediate, but there is a very strong and noticeable influence on even the most modest of investigations.

For example, considerations of free will are presently leading to research in neuroscience, cognitive science, marketing, ethics, and other related areas to responsibility and decision making.

Philosophy really needs a PR campaign because your view is not uncommon. The problem is that it's largely ignorant of the influence of philosophy but perhaps it's not your fault. Philosophy has a very bad image and it's mostly undeserved.

Part of this is why so many students flock to undergraduate philosophy courses expecting an easy A because it's just opinions and bull****ting, right? They hear the sometimes 'ridiculous' things that philosophers care about and try to argue; they can do that: how hard could it be? Then they get a C and wonder what the hell just happened to them.
durkadurka, you only believe in free will because....(LC) Quote
06-29-2010 , 03:00 PM
Quote:
Originally Posted by durkadurka33
I'm not saying that they don't know the difference. I'm saying that YOU think I was making a claim about the descriptive fact that they actually use it. You think that I was saying that they don't use the term. That is false. I was saying that they shouldn't use it because it's just a rhetorical term. They do know the difference between descriptive and prescriptive but they still shouldn't use that term.

I'm suggesting that you've made a mistake for my prescriptive claim thinking that it was descriptive.
Will you stop embarrassing yourself?

You said: "No, the pessimist only applies to incompatibilists IF the deterministic thesis is true. Basically, it's some rhetorical word for the incompatibilist. Calling them a pessimist is unfair. They'd call themselves realists."

It's dead obvious you did not know that it was a near canonical term for a philosophical position. Just like you didn't know there was more than one Strawson who wrote a paper about free will in the last 50 years. "They'd call themselves realists" you said. WHAT? You were really making your "prespective" case there and not not knowing what the **** you were talking about?

That you would say they shouldn't use the term 'pessimistic incompatibilism' is BAT**** INSANE. The label is perfectly appropriate; what could you possibly want out of a philosophical label? I was just about to make the mistake of citing 10 examples of labels for philosophical positions which have a qualifier that I didn't like, but then I realized at this point you are nothing above an idiot.
durkadurka, you only believe in free will because....(LC) Quote
06-29-2010 , 03:48 PM
"prespective" = "prescriptive", typo
durkadurka, you only believe in free will because....(LC) Quote
06-29-2010 , 07:38 PM
Quote:
Originally Posted by durkadurka33
That's known as the fallacy of ignorance.

Because I don't know x, then x is false. Fallacy.

Your position may be different in that you may mean: If x is unknowable, then x does not exist.

This is different but still begging the question: why is knowability a necessary condition for existence?
That's well outside the subject of the thread, and doesn't have a short answer.
durkadurka, you only believe in free will because....(LC) Quote
06-29-2010 , 08:10 PM
Quote:
Originally Posted by Aaron W.
Can you elaborate? It's hard to parse because you're telling me that I have a "model" of something, but apparently, I keep modeling the wrong thing (or I'm modeling in the wrong way or wrong place).
I'm not clear on where it's hard to parse. A choice would be something like:

Code:
function findvalue(bean_count)

   if (bean_count % 3) then
      return 0
   else
      return 1
   endif

end

function choosebeans(bean_count)

   take_one = findvalue(bean_count - 1)
   take_two = findvalue(bean_count - 2)

   if (take_one > take_two) then
      return 1
   else if (take_two > take_one) then
      return 2
   else
      return ceiling(random() * 2)
   endif

end
The model for taking one bean here is "bean_count - 1" and the model for taking two beans is "bean_count - 2". Each modeled action is assigned a value. The values of the actions are then weighed, and the action with higher value is picked.

So this meets the criteria.

The if/then program doesn't have any internal representation of the actions. In terms of the action of choosing one bean, that program contains nothing showing what it means, what it looks like, what its value is, etc.
durkadurka, you only believe in free will because....(LC) Quote
06-29-2010 , 08:12 PM
Quote:
Originally Posted by Aaron W.
Also, would you consent to reducing the number of starting beans to 3? I chose 4 initially because 4 is two bits' worth of information, but in terms of not overcomplicating the issue, I think 3 would be a better choice.
We can start with as few as 2 beans, since that is the minimum required to give more than one action.
durkadurka, you only believe in free will because....(LC) Quote
06-29-2010 , 08:19 PM
Quote:
Originally Posted by BrianTheMick
Madnak, you are misunderstanding emergence and complex systems, which is killing me.
We stopped talking about emergence a couple of dozen posts ago. This quote has nothing to do with the subject.

Quote:
Emergence is complexity due to interaction between simple parts that change the future actions of the parts, along with the entire system of simple parts causing stuff that the simple stuff cannot cause by themselves.

The second part is the more important here. It causes something completely new that could not a priori be predicted purely by looking at the parts. There is no a priori modelling possible. There is something new that can be argued
This is false. There are those who argue that something "new" can emerge, but most of the time emergence is a reference to phenomena that can be a priori predicted.

Quote:
Every single on of your examples and arguments has led to you making an excellent counterargument to what you appear to by trying to argue.

Seriously, you make decent intuitional first statements, but it is like after that you just want to be abused.
Considering that every summary you've attempted of my points has been flat wrong, I'm not convinced your reading comprehension goes beyond first statements.
durkadurka, you only believe in free will because....(LC) Quote
06-29-2010 , 08:43 PM
Quote:
Originally Posted by Matt R.
I guess I don't see how a chess simulation "significantly resembles or corresponds" to the action of moving a chess piece then. It's not like the computer is modeling the action of moving your hand, picking up a chess piece, and moving it to another square. It sounds like this is what you are wanting my simple circuit to model with respect to turning on a light.
The computer program models the logic, the tactics, the consequences, and the transition from position A to position B. It doesn't model the physical act of moving a piece.

Quote:
I know. I was pointing out the fact that you reworded "turning on a light" to "state of the light being on/off" simply so you can say: "See! it's not even an action!"
You were the one who reworded it. Go back and read the posts - I objected that a switch in a particular position isn't a model of an action, you claimed that it is a model of a state.

An action is a transition from one state to another, a single state is not itself an action. Nothing in your circuit represents the transition from on to off, nor the transition from off to on. A chess computer does recognize the transition from the initial board position to the final board position, including the game rules restricting the movement of various pieces (and the alternating movement of white and black).

Quote:
It is a fundamental aspect of information theory that the logic of something like a chess game can be programmed into a circuit. Again, that's how computers work. If the game situation is simple enough (like say there are only 2 legal moves and checkmate follows), it is trivial to program the logic of such a game into a circuit. And it would only take a simple variation of my light bulb circuit to program this.
The "game" you're discussing isn't chess.

Quote:
OK, I'm really really curious as to what defining criteria you are using for a model then. As in, how do you tell whether X is a model or not a model.
"Does x share identifying features with the thing it is a model of?" Again, this admits Sorites questions. I don't think that's a problem.

Quote:
Again, what the heck distinguishes a model from not a model then. It's trivial to program a circuit (a simple circuit; like mine with some simple variations) to analyze a situation where there are two outcomes, the values of these outcomes, and the actions of arriving at those outcomes (e.g. checkmate/draw). This is like the entire point of the field of information theory. The only reason you would need a full computer to model the chess game is if it got more complicated (and then, you'd obviously just be adding more circuit components).
Either a "simple" circuit is capable of containing more information than a simple "on/off," or you're wrong.

Quote:
How on earth does a blank picture meet any sort of defining criteria for a map?
It's a flat representation of an area. It's just like other maps, except with fewer details.

Isn't this the reasoning you're using for your circuit?
durkadurka, you only believe in free will because....(LC) Quote
06-29-2010 , 09:10 PM
Quote:
Originally Posted by madnak
I'm not clear on where it's hard to parse. A choice would be something like:

Code:
function findvalue(bean_count)

   if (bean_count % 3) then
      return 0
   else
      return 1
   endif

end

function choosebeans(bean_count)

   take_one = findvalue(bean_count - 1)
   take_two = findvalue(bean_count - 2)

   if (take_one > take_two) then
      return 1
   else if (take_two > take_one) then
      return 2
   else
      return ceiling(random() * 2)
   endif

end
The model for taking one bean here is "bean_count - 1" and the model for taking two beans is "bean_count - 2". Each modeled action is assigned a value. The values of the actions are then weighed, and the action with higher value is picked.

So this meets the criteria.

The if/then program doesn't have any internal representation of the actions. In terms of the action of choosing one bean, that program contains nothing showing what it means, what it looks like, what its value is, etc.
What is important to the conversation is to remove as many extraneous pieces as possible. In particular, the introduction of function calls and variable masks a lot of the details that I'm trying to bring to the front. In particular, it seems (as with your long discussion regarding computer chess) that you're putting extra emphasis on programming language without recognizing it's really just simple circuitry (AND/OR/NOT gates).

I would say that the function call of findvalue and the "else" clause are all extraneous. Do you agree?
durkadurka, you only believe in free will because....(LC) Quote
06-29-2010 , 09:19 PM
Quote:
Originally Posted by madnak
Code:
function findvalue(bean_count)

   if (bean_count % 3) then
      return 0
   else
      return 1
   endif

end

function choosebeans(bean_count)

   take_one = findvalue(bean_count - 1)
   take_two = findvalue(bean_count - 2)

   if (take_one > take_two) then
      return 1
   else if (take_two > take_one) then
      return 2
   else
      return ceiling(random() * 2)
   endif

end
Also, this program does behave according to the instructions provided.
durkadurka, you only believe in free will because....(LC) Quote
06-29-2010 , 09:42 PM
Quote:
Originally Posted by Aaron W.
I would say that the function call of findvalue and the "else" clause are all extraneous. Do you agree?
I do, anything purely notational can be dumped.
We could also get rid of the variables. It's the process that matters. Specifically (in terms of a typical computer) using some process to create an object in memory to meaningfully represent each action (modeling), and then running some separate process on the basis of these objects in memory to determine a particular action from the group (evaluation), and only then the actual instruction to take the action.
durkadurka, you only believe in free will because....(LC) Quote
06-29-2010 , 09:44 PM
Quote:
Originally Posted by Aaron W.
Also, this program does behave according to the instructions provided.
I'm not sure what you mean by this.
durkadurka, you only believe in free will because....(LC) Quote
06-29-2010 , 10:22 PM
Quote:
Originally Posted by madnak
The computer program models the logic, the tactics, the consequences, and the transition from position A to position B. It doesn't model the physical act of moving a piece.
And my circuit models the logic, the consequences and the transition from on to off or off to on. No tactics of course, because it's a simple situation.


Quote:
You were the one who reworded it. Go back and read the posts - I objected that a switch in a particular position isn't a model of an action, you claimed that it is a model of a state.
I was changing the wording depending on the context, and I used both statements so this should have been clear. It is obvious both statements apply equally well to what we're talking about. My circuit models either the state of the light bulb or the action of turning it on/off, depending on the view you take. You were latching on to the wording of "state of the light bulb" so you could claim it's not even an action... it's obvious that's what you were doing because that's exactly what you did.

Quote:
An action is a transition from one state to another, a single state is not itself an action. Nothing in your circuit represents the transition from on to off, nor the transition from off to on. A chess computer does recognize the transition from the initial board position to the final board position, including the game rules restricting the movement of various pieces (and the alternating movement of white and black).
You mean like the transition from light on -> off or light off -> on?


Quote:
The "game" you're discussing isn't chess.
So when you have an end game in chess where there are only 2 legal moves and one results in mate, it stops being chess...


Quote:
Either a "simple" circuit is capable of containing more information than a simple "on/off," or you're wrong.
It is capable of containing more information, obviously.


Quote:
It's a flat representation of an area. It's just like other maps, except with fewer details.

Isn't this the reasoning you're using for your circuit?
What area is it representing, and what information does it contain to make it a map. I'm not seeing how a blank pictures meets any defining criteria for a map, and what this has to to with my reasoning for the circuit.
durkadurka, you only believe in free will because....(LC) Quote
06-29-2010 , 10:23 PM
madnak,
If I wrote a computer program that contained the logic:

If switch = closed, then light = on.
If switch = open, then light = off.

Would it be modeling the action of turning on/off a light? Why or why not?


Edit: As to the "weigh and rank" part of your definition you gave earlier for choice.... If my program stated to rank light = on higher if switch = closed but to rank light = off higher if switch = open, it is weighing and ranking the potential actions right?

If not, can you contrast this with a computer program that ranks move Y1 higher if the board is in position X1 vs. ranking move Y2 higher if board is in position X2, showing why the chess computer is "weighing and ranking" but the light program isn't?

Last edited by Matt R.; 06-29-2010 at 10:34 PM.
durkadurka, you only believe in free will because....(LC) Quote
06-30-2010 , 01:34 AM
Quote:
Originally Posted by madnak
I'm not sure what you mean by this.
By this, I mean that I misread the code.
durkadurka, you only believe in free will because....(LC) Quote
06-30-2010 , 01:50 AM
Quote:
Originally Posted by madnak
I do, anything purely notational can be dumped.
We could also get rid of the variables. It's the process that matters. Specifically (in terms of a typical computer) using some process to create an object in memory to meaningfully represent each action (modeling), and then running some separate process on the basis of these objects in memory to determine a particular action from the group (evaluation), and only then the actual instruction to take the action.
I'm going to do this in a few stages (and go down to 3 beans at the start). I want you to tell me where I lose the model that chooses. Here is stage 0 (your code):

Code:
function findvalue(bean_count)

   if (bean_count % 3) then
      return 0
   else
      return 1
   endif

end

function choosebeans(bean_count)

   take_one = findvalue(bean_count - 1)
   take_two = findvalue(bean_count - 2)

   if (take_one > take_two) then
      return 1
   else if (take_two > take_one) then
      return 2
   else
      return ceiling(random() * 2)
   endif

end
Stage 1: Remove the randomness

Code:
function findvalue(bean_count)

   if (bean_count % 3) then
      return 0
   else
      return 1
   endif

end

function choosebeans(bean_count)

   take_one = findvalue(bean_count - 1)
   take_two = findvalue(bean_count - 2)

   if (take_one > take_two) then
      return 1
   else
      return 2
   endif

end
Stage 2: Rewrite the program to handle individual bean counts separately.

Code:
function findvalue(bean_count)

   if (bean_count % 3) then
      return 0
   else
      return 1
   endif

end

function choosebeans(bean_count)

   if (bean_count = 3) then
      take_one = findvalue(3 - 1)
      take_two = findvalue(3 - 2)

     if (take_one > take_two) then
        return 1
     else
        return 2
     endif
  endif

   if (bean_count = 2) then
      take_one = findvalue(2 - 1)
      take_two = findvalue(2 - 2)

     if (take_one > take_two) then
        return 1
     else
        return 2
     endif
  endif

   if (bean_count = 1) then
      take_one = findvalue(1 - 1)
      take_two = findvalue(1 - 2)

     if (take_one > take_two) then
        return 1
     else
        return 2
     endif
  endif

end
Stage 3: Remove the findvalue function call.

Code:
function choosebeans(bean_count)

   if (bean_count = 3) then
      take_one = 0
      take_two = 0

     if (take_one > take_two) then
        return 1
     else
        return 2
     endif
  endif

   if (bean_count = 2) then
      take_one = 0
      take_two = 1

     if (take_one > take_two) then
        return 1
     else
        return 2
     endif
  endif

   if (bean_count = 1) then
      take_one = 1
      take_two = 0

     if (take_one > take_two) then
        return 1
     else
        return 2
     endif
  endif

end
Stage 4: Remove the extraneous variables take_one and take_two

Code:
function choosebeans(bean_count)

   if (bean_count = 3) then
     if (0 > 0) then
        return 1
     else
        return 2
     endif
  endif

   if (bean_count = 2) then
     if (0 > 1) then
        return 1
     else
        return 2
     endif
  endif

   if (bean_count = 1) then
     if (1 > 0) then
        return 1
     else
        return 2
     endif
  endif

end
Stage 5: Remove extraneous code.

Code:
function choosebeans(bean_count)

   if (bean_count = 3) then
     return 2
  endif

   if (bean_count = 2) then
     return 2
  endif

   if (bean_count = 1) then
     return 1
  endif

end
Since this last piece of code is equivalent to my code that was apparently not adequate, at one of these steps I have removed something that you deem essential to a model. What is it?
durkadurka, you only believe in free will because....(LC) Quote
06-30-2010 , 11:07 AM
Quote:
Originally Posted by Aaron W.
Stage 3: Remove the findvalue function call.
Here.

You didn't just remove the function call, you removed both the model ("bean_count - 1") and the evaluation (assigning values based on an internal process) in one fell swoop.

The program isn't assigning values based on the analysis of a model. The values are hardcoded.

If you want to remove the function call, you have to preserve the important processing, like so:

Code:
if (bean_count = 3) then
      if ((bean_count - 1) % 3) then
         take_one = 0
      else
         take_one = 1
      endif
      if ((bean_count - 2) % 3) then
         take_two = 0
      else
         take_two = 1
      endif

     if (take_one > take_two) then
        return 1
     else
        return 2
     endif
  endif
And of course, you'd need an interpreter or compiler that would preserve the relevant processing. Stage 2 probably makes that hopeless - virtually any program parsing this code is going to remove choice as a superfluous element.
durkadurka, you only believe in free will because....(LC) Quote
06-30-2010 , 11:24 AM
Quote:
Originally Posted by Matt R.
And my circuit models the logic, the consequences and the transition from on to off or off to on. No tactics of course, because it's a simple situation.
It doesn't matter whether it's a simple situation - choice is a powerful process that isn't really appropriate to simple situations. But the process still needs to be present. Even if the so-called "tactics" of a situation is an empty set, the program still needs to evaluate that empty set. That processing is part of what makes a choice.

And I'd love to hear how a simple circuit models the logic, consequences, and transition.

Quote:
You mean like the transition from light on -> off or light off -> on?
Yeah, there is no representation of this transition.

I gave Aaron a simple representation of a model for a transition. It included three important elements. The simplest expression is the following: "3 - 1 = 2."

It has a representation of the final condition (2), a representation of the initial condition (3), and a representation of the route by which the initial condition leads to the final condition (- 1).

I won't say that all modeled actions necessarily include each of these elements, but it's a damned good start. Show me where your simple circuit stores each of these elements.

Quote:
So when you have an end game in chess where there are only 2 legal moves and one results in mate, it stops being chess...
It's still chess so long as the reason there are only 2 moves is related to the rules of chess. If a simple circuit can analyze a chessboard and determine how many moves are available, then we can start talking about how it can evaluate a chess endgame. But if the two available moves are hardcoded, then the program isn't evaluating chess at all. The programmer is evaluating chess, and hardcoding the results of the evaluation into the circuit. The circuit isn't playing chess at all, not in the sense of making choices about chess.

Quote:
It is capable of containing more information, obviously.
Okay then, that's news to me. Let's get concrete. How much information can a circuit contain before it ceases to be a "simple" circuit? Which processes is a "simple" circuit capable of?

Quote:
What area is it representing, and what information does it contain to make it a map. I'm not seeing how a blank pictures meets any defining criteria for a map, and what this has to to with my reasoning for the circuit.
A map is a model of an area. Specifically, a representation of the features of an area on earth. A map is usually a flat image.

A blank image is like a map in that it is also a flat image. However, it doesn't contain any information corresponding to any area, so you don't want to call it a map.

Similarly, a circuit may be superficially similar to a model composed of circuits. But it doesn't contain any information corresponding to any action, so I don't want to call it a model of an action.

Last edited by madnak; 06-30-2010 at 11:33 AM.
durkadurka, you only believe in free will because....(LC) Quote
06-30-2010 , 11:40 AM
Quote:
Originally Posted by madnak
Here.

You didn't just remove the function call, you removed both the model ("bean_count - 1") and the evaluation (assigning values based on an internal process) in one fell swoop.

The program isn't assigning values based on the analysis of a model. The values are hardcoded.
What is the difference between this and a library of positions in a chess computer? (Edit: I'm thinking specifically of opening move libraries)
durkadurka, you only believe in free will because....(LC) Quote
06-30-2010 , 11:44 AM
Quote:
Originally Posted by Matt R.
madnak,
If I wrote a computer program that contained the logic:

If switch = closed, then light = on.
If switch = open, then light = off.

Would it be modeling the action of turning on/off a light? Why or why not?
An action is a transition from one state to another. This implies an initial state, a final state, and some process for moving from one to the other. In theory, I think the process is the only thing that must necessarily be present in a model of the action. But representing one state, or even two states, is irrelevant. The important thing is a representation of going from one state to the other state.

Quote:
Edit: As to the "weigh and rank" part of your definition you gave earlier for choice.... If my program stated to rank light = on higher if switch = closed but to rank light = off higher if switch = open, it is weighing and ranking the potential actions right?
No, it's weighing and ranking the states. In order to weigh an action, the computer needs to assign a value to moving from on to off (or from off to on). An action is moving a switch from one position to another position. The action (the process) must be assigned the value.

The actual action in this case is the moving of the switch - that is what must be assigned a value.

Quote:
If not, can you contrast this with a computer program that ranks move Y1 higher if the board is in position X1 vs. ranking move Y2 higher if board is in position X2, showing why the chess computer is "weighing and ranking" but the light program isn't?
The computer is ranking the value of moving from position X1 to position A1 by means of move Y1. (Or, in the second case, it's ranking the value of moving from position X2 to position A2 by means of move Y2.)

The computer is ranking an action - the transition from an initial position to a final position by means of a process. If the computer is only evaluating the initial position and the final position, without modeling the process by which one leads to the other, then it isn't choosing.
durkadurka, you only believe in free will because....(LC) Quote
06-30-2010 , 11:59 AM
Quote:
Originally Posted by Aaron W.
What is the difference between this and a library of positions in a chess computer? (Edit: I'm thinking specifically of opening move libraries)
The library of positions is used as an aid in evaluating moves.

If a chess program had every possible board position analyzed (with the results hardcoded), then it wouldn't be choosing.

I don't consider choice a matter of inputs and outputs, but a matter of processing. It is theoretically possible for a computer program to output the same results that Deep Blue outputs, without making choices. (Even though I believe the real Deep Blue makes choices.)

Also a behavioral zombie of a human, etc.
durkadurka, you only believe in free will because....(LC) Quote
06-30-2010 , 12:54 PM
Quote:
Originally Posted by madnak
The library of positions is used as an aid in evaluating moves.

If a chess program had every possible board position analyzed (with the results hardcoded), then it wouldn't be choosing.

I don't consider choice a matter of inputs and outputs, but a matter of processing. It is theoretically possible for a computer program to output the same results that Deep Blue outputs, without making choices. (Even though I believe the real Deep Blue makes choices.)

Also a behavioral zombie of a human, etc.
So as long as the player is playing within the opening moves library, the computer is not making any decisions?

Also, I guess I'm having a hard time understanding what you mean by

Quote:
We could also get rid of the variables. It's the process that matters.
When I got rid of the variables, you told me I did it wrong. Can you rewrite the code so that the variables are removed?
durkadurka, you only believe in free will because....(LC) Quote
06-30-2010 , 01:06 PM
Quote:
Originally Posted by Aaron W.
So as long as the player is playing within the opening moves library, the computer is not making any decisions?
Correct.

Quote:
Also, I guess I'm having a hard time understanding what you mean by

When I got rid of the variables, you told me I did it wrong. Can you rewrite the code so that the variables are removed?
Okay, I'll assume the program still has access to the number of beans, through the countbeans() function:

Code:
function choosebeans(bean_count)

   if (countbeans() = 3) then
      if ((3 - 1) % 3) then
         if ((3 - 2) % 3) then
            return ceiling(random() * 2)
         else
            return 2
         endif
      else
         if ((3 - 2) % 3) then
            return 1
         else
            return ceiling(random() * 2)
         endif
      endif
   endif

   if (countbeans() = 2) then
      if ((2 - 1) % 3) then
         if ((2 - 2) % 3) then
            return ceiling(random() * 2)
         else
            return 2
         endif
      else
         if ((2 - 2) % 3) then
            return 1
         else
            return ceiling(random() * 2)
         endif
      endif
   endif

   if (countbeans() = 1) then
      if ((1 - 1) % 3) then
         if ((1 - 2) % 3) then
            return ceiling(random() * 2)
         else
            return 2
         endif
      else
         if ((1 - 2) % 3) then
            return 1
         else
            return ceiling(random() * 2)
         endif
      endif
   endif

end
durkadurka, you only believe in free will because....(LC) Quote
06-30-2010 , 01:44 PM
Out of curiosity, why do you keep putting in random statements? It feels like you're intentionally making things more complicated, whereas the stated goal is simplicity.

And why do you introduce a "countbeans" function when you have the bean_count?
durkadurka, you only believe in free will because....(LC) Quote
06-30-2010 , 01:50 PM
Quote:
Originally Posted by madnak
Code:
function choosebeans(bean_count)

   if (countbeans() = 3) then
      if ((3 - 1) % 3) then
         if ((3 - 2) % 3) then
            return ceiling(random() * 2)
         else
            return 2
         endif
      else
         if ((3 - 2) % 3) then
            return 1
         else
            return ceiling(random() * 2)
         endif
      endif
   endif

   if (countbeans() = 2) then
      if ((2 - 1) % 3) then
         if ((2 - 2) % 3) then
            return ceiling(random() * 2)
         else
            return 2
         endif
      else
         if ((2 - 2) % 3) then
            return 1
         else
            return ceiling(random() * 2)
         endif
      endif
   endif

   if (countbeans() = 1) then
      if ((1 - 1) % 3) then
         if ((1 - 2) % 3) then
            return ceiling(random() * 2)
         else
            return 2
         endif
      else
         if ((1 - 2) % 3) then
            return 1
         else
            return ceiling(random() * 2)
         endif
      endif
   endif

end
I'm going to strip down you code... again. Removing the random() functions and going down to two beans (as per your suggestion). I'm also going to get rid of your countbeans() function.

Code:
function choosebeans(bean_count)
   if (bean_count = 2) then
      if ((2 - 1) % 3) then
         if ((2 - 2) % 3) then
            return 2
         endif
      else
         if ((2 - 2) % 3) then
            return 1
         endif
      endif
   endif

   if (bean_count = 1) then
      if ((1 - 1) % 3) then
         if ((1 - 2) % 3) then
            return 2
         endif
      else
         if ((1 - 2) % 3) then
            return 1
         endif
      endif
   endif

end
Do you believe this still represents the code you gave?

What if I perform the subtractions?

Code:
function choosebeans(bean_count)
   if (bean_count = 2) then
      if (1 % 3) then
         if (0 % 3) then
            return 2
         endif
      else
         if (0 % 3) then
            return 1
         endif
      endif
   endif

   if (bean_count = 1) then
      if (0 % 3) then
         if (-1 % 3) then
            return 2
         endif
      else
         if (-1 % 3) then
            return 1
         endif
      endif
   endif

end
durkadurka, you only believe in free will because....(LC) Quote

      
m