• Welcome to #1 Roulette Forum & Message Board | www.RouletteForum.cc.

News:

Progression bets are nothing more than different size bets on different spins. You could get lucky and win big, or unlucky and lose even more.

Main Menu
Popular pages:

Roulette System

The Roulette Systems That Really Work

Roulette Computers

Hidden Electronics That Predict Spins

Roulette Strategy

Why Roulette Betting Strategies Lose

Roulette System

The Honest Live Online Roulette Casinos

Coding question? Can anyone help?

Started by ThomasGrant, Jul 06, 12:33 AM 2011

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ThomasGrant

Ok, got a coding question.
Perhaps someone here can help me with this one.

The code is to do with Da Alembert progression.
For those that don't know how it works.
All you do is add 1 unit on a loss.
Or subtract 1 unit on a win.
Lose = +1
Win  = -1

Now for the problem I am having.

I can sort of understand how it works.
But I am having trouble coding it.

I have the many parts of it figured out.
I have the Increase and Decrease figured out.
For these I use.
Inc(a1)
Dec(a1)

So lets use Red and Black for an example.

Lets start with the first spin.
If Red turns up.
We bet on Black.

If Black turns up.
we bet on Red.

So far, this part is easy.

On the next spin.
If Red turns up again.
We increase the bet on Black.

So now we are in the Black betting mode.
Each time Red turns up.
We increase the bet on Black.

If Black turns up.
We decrease the bet on Black.

It would look like this.

1:Red = bet on Black
2:Red = bet on Black +1 unit (Total 2 units)
3:Red = bet on Black + 1 unit (Total 3 units)
4:Black = bet on Black -1 unit (Total 2 units)
5:Black = bet on Black -1 unit (Total 1 unit) Here it returns to 1.
6:Black (Now that it has won the Black session) we start betting on Red.
7:Black = bet on Red +1 unit (Total 2 units)

Each time the bets reach 1. As in it returns to its starting point.
If on the next bet it wins.
We then go over to the other side.
And keep repeating the process.

The problem I have.
Is getting out of the loop.
Just cant seem to figure out how to go from Red to Black.

The more variables I put in.
The more complex it becomes.

Here is what I wrote in RSS Pro.
It sort of works.
It is very close to what I want it to do.
It just gets stuck.
What I mean buy stuck?
It goes and bets on the wrong thing when it reaches 1. Or 0
var last_nr,chips,fl_stop;

procedure Button1Click(Sender: TObject);
begin
    chips:=[0,0.01,0.10,0.50,1,5,10,25,50,100];
     
    fl_stop:=0;
    a1:=1;
    a2:=1;
   
    Repeat
       
    last_nr:=get_last_landed_number();
    if last_nr=-1 then
    begin
        bet_x_on_y(chips[1],['Low'],chips);
        click_spin_button();
    end;
   
    if number_is(last_nr,'Line_3_7_11') then
    begin
        if win_a2=true then
        begin 
            bet_x_on_y(chips[1]*a2,['Line_3_7_11'],chips);
        end else
        if a1=0 then
        begin
            a2:=1;
            bet_x_on_y(chips[1]*a2,['Line_3_7_11'],chips);       
        end else
        if a2>1 then
        begin
            bet_x_on_y(chips[1]*a2,['Line_3_7_11'],chips);
        end else
        begin                               
            bet_x_on_y(chips[1]*a1,['Line_1_5_9'],chips);
        end;
        click_spin_button();
        last_nr:=get_last_landed_number();   
        if number_is(last_nr,'Line_3_7_11') then
        begin
            if win_a1=false then Inc(a1);
        end else win_a1:=false;
        if number_is(last_nr,'Line_1_5_9') then
        begin
            Dec(a1);
            if a1>=1 then win_a1:=true;
            else win_a1:=false;
        end;
    end;
   
    if number_is(last_nr,'Line_1_5_9') then
    begin         
        if win_a1=true then
        begin
            bet_x_on_y(chips[1]*a1,['Line_1_5_9'],chips);
        end else
        if a2=0 then
        begin
            a1:=1;
            bet_x_on_y(chips[1]*a1,['Line_1_5_9'],chips);             
        end else
        if a1>1 then
        begin
            bet_x_on_y(chips[1]*a2,['Line_3_7_11'],chips);
        end else               
        begin
            bet_x_on_y(chips[1]*a2,['Line_3_7_11'],chips);
        end;       
        click_spin_button();
        last_nr:=get_last_landed_number();
        if number_is(last_nr,'Line_3_7_11') then
        begin
            Dec(a2);
            if a2>=1 then win_a2:=true;
            else win_a2:=false;
        end else win_a2:=false;
        if number_is(last_nr,'Line_1_5_9') then
        begin
            if win_a2=false then Inc(a2);           
        end;
    end;
//'Line_1_5_9':if in_array(number,[1,2,3,4,5,6,13,14,15,16,17,18,25,26,27,28,29,30])
//'Line_3_7_11':if in_array(number,[7,8,9,10,11,12,19,20,21,22,23,24,31,32,33,34,35,36])   
    if fl_stop=1 then break;                       
    Until fl_stop=1;   
end;

procedure Button2Click(Sender: TObject);
begin
    fl_stop:=1;
end;


If anyone can assist with this.
I would appreciate it.

It's all just logic.
And putting in the correct if, else and end statements in the correct place.
And in the correct order.

If this happens do that.
If that happens do this else do that.

If Red bet on Black.
While in betting on Black.
If Black: bet on Black -1 unit.
If Red: bet on Black + 1 unit.
If unit = 0
Then bet on Red.

In the code that I posted.
You see it betting on Lines.
But the concept is the same.
"What we do in life, echoes in eternity"

*Link Removed*  The Roulette Professor. *Link Removed*

Playborne

Hi mate,

I haven;t heard about Da Alembert progression so far, so I found it quite interesting but a bit confusing as well.. And one more thing I can't understand is how we start ? Is the first bet totally accidental, or do we do something else?
playnow, playmore, playborneâ,,¢

VLS

Hey Tom my mate, since this is a logical problem, have you tried making a diagram out of it.


You know, using algorithm flowcharts.


Gliffy comes to mind.


link:://:.gliffy.com/


Understanding where you are stuck is better if done visually!


There are more chances of solving it and attracting non-pascal programmers with the flowchart abstraction :)

You can actually show us graphically where the problem is regardless of the language  :thumbsup:

Hope it helps.
Vic
🡆 ROULETTEIDEAS․COM, home of the RIBOT FREE software bot, with GIFTED modules for the community! ✔️

superman

Hey Tom, not familier with the scripting you are using but 1up 1 down is very simple, I keep progressions away from bet selection usually, do your bet selection 1st then spin and get result then check if it won or lost, 3 steps

if win then

if progression > 1 then
progression = progression -1
else
progression = 1
endif

elseif lose then

progression = progression+1

endif
There's only one way forward, follow random, don't fight with it!

Ignore a thread/topic that mentions 'stop loss', 'virtual loss' and also when a list is provided of a progression, mechanical does NOT work!

ThomasGrant

Never mind...
I finally figured it out.
Ohh my gosh.
What a hassle.
But it works.

"What we do in life, echoes in eternity"

*Link Removed*  The Roulette Professor. *Link Removed*

ophis

Looking at this you are doing exacly what every beginner programer is doing.

You are trying to do everything at once. You may get this to work now but if you will come back to this code after 2 weeks you will just forget what was this all about. Not to mention that you can't code like this anything more complicated and making any changed to to code like this is just pain in the neck.

You have to separate everything with procedures/functions.

Make functions like:

CheckLW
ChooseToBet
CalculateProgression
PlaceBets

It will be much easier for you. I can rebuild this for you if you would like... You willl see how much easier this can be done. Just tell me if You have 2 separate progressions over here. (because like I said its abit messed up here)
Multi Systems Tracker
➨ [url="//rmst.forumer.com"]RMST.forumer.com[/url]

ThomasGrant

Quote from: ophis on Jul 06, 06:09 AM 2011
Looking at this you are doing exacly what every beginner programer is doing.

You are trying to do everything at once. You may get this to work now but if you will come back to this code after 2 weeks you will just forget what was this all about. Not to mention that you can't code like this anything more complicated and making any changed to to code like this is just pain in the neck.

You have to separate everything with procedures/functions.

Make functions like:

CheckLW
ChooseToBet
CalculateProgression
PlaceBets

It will be much easier for you. I can rebuild this for you if you would like... You willl see how much easier this can be done. Just tell me if You have 2 separate progressions over here. (because like I said its abit messed up here)

Thank you for your comments.
And I understand what you are saying.
However... I am not a professional coder.

I comment my work.
So I can go back and see what I did.
And what procedure does what.

I got it to work.
And that is the main thing.
I may see if I can make it simpler.
But as for now...
I will post the script.
And do a video of it in action.
"What we do in life, echoes in eternity"

*Link Removed*  The Roulette Professor. *Link Removed*

ophis

Ok here is what i got. It maybe does not look simpler... but its much more easier to work with.

  var to_bet:string='';
      last_color:string='';
      units:integer=0;
      reds:array[0..17] of byte = (1,3,5,7,9,12,14,16,18,19,21,23,25,27,30,32,34,36);


//not sure if can do it more simple in RSS but this is the vanilla way to determine color
procedure LastColor;
var i,last_number:byte;
begin
  //assign last number to local variable to do not invoke this function all over the time
  last_number:=get_last_landed_number();

  if last_number<>0 then begin    //check if number was 0

    last_color:='black';          //if it was not 0 then assign last color as black
    for i:=0 to high(reds) do     //now check if last number was red comparing array of reds
      if reds[i]=last_number then last_color='red';

  end else last_color:='green';

end;


//function to determine if u won or lose...it return TRUE of FALSE (boolean)
function HIT:boolean;
begin
  Result:=False;              //default return value

  if to_bet<>'' then begin    //check if we had anything to bet before (1st spin)
    LastColor;                                //invoke LastColor procedure to assign value to global variable
    if last_color=to_bet then Result:=True;   //check if won
  end;
end;


//determine what to bet next (not sure how does your system works but here is rough idea)
procedure ChooseToBet;
begin
  LastColor;

  if last_color='red' then to_bet='black';
end;


//proceduer calculating progression based if won or lose
//like i said no idea how you system behave
procedure CalculateProgression;
begin
  if to_bet<>'' then begin        //again we have to check if we had anyting to bet
    if HIT then                   //invoke HIT function
      inc(units)
    else
      if units>0 then dec(units);

  end;
end;


//again here...dunno how does this can look like in RSS
procedure PlaceBets;
begin
  bet_x_on_y(chips[1],[to_bet],units);
  click_spin_button();
end;


//main function to gather everythig
procedure Method;
begin
  CalculateProgression;
  ChooseToBet;

  //now u can also make here function to update your GUI... if you are doing it.
  PlaceBets;
end;


procedure Button1Click(Sender: TObject);
begin
  Method;
end;
Multi Systems Tracker
➨ [url="//rmst.forumer.com"]RMST.forumer.com[/url]

ThomasGrant

Here is a video of it.
link:://:.youtube.com/watch?v=Vpx0HKPakuk

I have also uploaded the zip file.
"What we do in life, echoes in eternity"

*Link Removed*  The Roulette Professor. *Link Removed*

-