File:1d choisi parmi 2 differents depasser score.png

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

1d_choisi_parmi_2_differents_depasser_score.png (610 × 461 pixels, file size: 6 KB, MIME type: image/png)

Captions

Captions

Add a one-line explanation of what this file represents

Summary

[edit]

Probabilité d'atteindre ou de dépasser un score.

On jette deux dés pouvant être différents (par exemple 1d4 et 1d8), et on retient le meilleur score (système utilisé dans le jeu de rôle Usagi Yojimbo). Pour chaque graphique : le premier dé est fixé, et il y a une courbe pour chaque second dé.


Probability to reach a value or make better.

Two dice, possibly different (e.g. 1d4 and 1d8), are thrown and only the best result is kept (system used in the Usagi Yojimbo roleplaying game). For each window: the first die is fixed, and there is one curve for each second die.

Auteur/author : Christophe Dang Ngoc Chan (cdang)

réalisé avec/made with Scilab

clear; clf;

// Initialisation

resultat=zeros(12,12,12);

// Calcul : toutes els valeurs sont calculées
// mais toutes ne sont pas affichées

for imax=4:2:12
   for jmax=imax:2:12
      for i=1:imax
         for j=1:jmax
            if j>i then resultat(imax,jmax,j) = resultat(imax,jmax,j)+1;
            else resultat(imax,jmax,i) = resultat(imax,jmax,i)+1; end;
         end
      end
   end
end

// Transformation dénombrement -> probabilité
// d4

somme44 = sum(resultat(4,4,:));
for i=1:4
   y44(i)=100*resultat(4,4,i)/somme44;
end

somme46 = sum(resultat(4,6,:));
for i=1:6
   y46(i)=100*resultat(4,6,i)/somme46;
end

somme48 = sum(resultat(4,8,:));
for i=1:8
   y48(i)=100*resultat(4,8,i)/somme48;
end

somme410 = sum(resultat(4,10,:));
for i=1:10
   y410(i)=100*resultat(4,10,i)/somme410;
end

somme412 = sum(resultat(4,12,:));
for i=1:12
   y412(i)=100*resultat(4,12,i)/somme412;
end

// d6

somme66 = sum(resultat(6,6,:));
for i=1:6
   y66(i)=100*resultat(6,6,i)/somme66;
end

somme68 = sum(resultat(6,8,:));
for i=1:8
   y68(i)=100*resultat(6,8,i)/somme68;
end

somme610 = sum(resultat(6,10,:));
for i=1:10
   y610(i)=100*resultat(6,10,i)/somme610;
end

somme612 = sum(resultat(6,12,:));
for i=1:12
   y612(i)=100*resultat(6,12,i)/somme612;
end

// d8

somme88 = sum(resultat(8,8,:));
for i=1:8
   y88(i)=100*resultat(8,8,i)/somme88;
end

somme810 = sum(resultat(8,10,:));
for i=1:10
   y810(i)=100*resultat(8,10,i)/somme810;
end

somme812 = sum(resultat(8,12,:));
for i=1:12
   y812(i)=100*resultat(8,12,i)/somme812;
end

// d10

somme1010 = sum(resultat(10,10,:));
for i=1:10
   y1010(i)=100*resultat(10,10,i)/somme1010;
end

somme1012 = sum(resultat(10,12,:));
for i=1:12
   y1012(i)=100*resultat(10,12,i)/somme1012;
end

// d12

somme1212 = sum(resultat(12,12,:));
for i=1:12
   y1212(i)=100*resultat(12,12,i)/somme1212;
end

// calcul du cumul

// d4

z44(4)=y44(4);
for i=3:-1:1
   z44(i)=z44(i+1)+y44(i);
end

z46(5)=y46(6);
for i=5:-1:1
   z46(i)=z46(i+1)+y46(i);
end

z48(8)=y48(8);
for i=7:-1:1
   z48(i)=z48(i+1)+y48(i);
end

z410(10)=y410(10);
for i=9:-1:1
   z410(i)=z410(i+1)+y410(i);
end

z412(12)=y412(12);
for i=11:-1:1
   z412(i)=z412(i+1)+y412(i);
end

// d6

z66(6)=y66(6);
for i=5:-1:1
   z66(i)=z66(i+1)+y66(i);
end

z68(8)=y68(8);
for i=7:-1:1
   z68(i)=z68(i+1)+y68(i);
end

z610(10)=y610(10);
for i=9:-1:1
   z610(i)=z610(i+1)+y610(i);
end

z612(12)=y612(12);
for i=11:-1:1
   z612(i)=z612(i+1)+y612(i);
end

// d8
 
z88(8)=y88(8);
for i=7:-1:1
   z88(i)=z88(i+1)+y88(i);
end

z810(10)=y810(10);
for i=9:-1:1
   z810(i)=z810(i+1)+y810(i);
end

z812(12)=y812(12);
for i=11:-1:1
   z812(i)=z812(i+1)+y812(i);
end

// d10

z1010(10)=y1010(10);
for i=9:-1:1
   z1010(i)=z1010(i+1)+y1010(i);
end

z1012(12)=y1012(12);
for i=11:-1:1
   z1012(i)=z1012(i+1)+y1012(i);
end

// d12

z1212(12)=y1212(12);
for i=11:-1:1
   z1212(i)=z1212(i+1)+y1212(i);
end

// tracé

subplot(2,2,1)

plot2d(1:4,z44,rect=[1,0,12,100],style=1)
plot2d(1:6,z46,rect=[1,0,12,10],style=2)
plot2d(1:8,z48,rect=[1,0,12,100],style=3)
plot2d(1:10,z410,rect=[1,0,12,100],style=4)
plot2d(1:12,z412,rect=[1,0,12,100],style=5)

xtitle('d4','rés.','%')

subplot(2,2,3)

plot2d(1:8,z48,rect=[1,0,12,100],style=1)
plot2d(1:8,z68,rect=[1,0,12,100],style=2)
plot2d(1:8,z88,rect=[1,0,12,100],style=3)
plot2d(1:10,z810,rect=[1,0,12,100],style=4)
plot2d(1:12,z812,rect=[1,0,12,100],style=5)

xtitle('d8','rés.','%')


subplot(2,2,2)

plot2d(1:12,[z412,z612,z812,z1012,z1212],rect=[1,0,12,100])

xtitle('d12','rés.','%')

subplot(2,2,4)

xstring(0.5,0.8,'Légende')

xsegs([0,0,0,0.6,0.6 ; 0.1,0.1,0.1,0.7,0.7],...
[0.6,0.4,0.2,0.6,0.4 ; 0.6,0.4,0.2,0.6,0.4],...
1:5)
xstring(0.15,0.55,'d4')
xstring(0.15,0.35,'d6')
xstring(0.15,0.15,'d8')
xstring(0.75,0.55,'d10')
xstring(0.75,0.35,'d12')

Licensing

[edit]
GNU head Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled GNU Free Documentation License.
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported license.
You are free:
  • to share – to copy, distribute and transmit the work
  • to remix – to adapt the work
Under the following conditions:
  • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
  • share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
This licensing tag was added to this file as part of the GFDL licensing update.

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current11:50, 16 February 2006Thumbnail for version as of 11:50, 16 February 2006610 × 461 (6 KB)Cdang (talk | contribs)Probabilité d'atteindre ou de dépasser un score. On jette deux dés pouvant être différents (par exemple 1d4 et 1d8), et on retient le meilleur score (système utilisé dans le jeu de rôle ''Usagi Yojimbo''). Pour chaque graphique : le premier dé e

The following 2 pages use this file:

Metadata