mirror of
https://github.com/appinfosapienza/so-un-bot.git
synced 2025-05-06 15:59:37 +02:00
Adapt to new bot structure
This commit is contained in:
parent
ff7e08ada9
commit
3f84e1d831
3414 changed files with 41525 additions and 709 deletions
16
legacy/Data/ingsw/0721_18/correct.txt
Normal file
16
legacy/Data/ingsw/0721_18/correct.txt
Normal file
|
@ -0,0 +1,16 @@
|
|||
<pre>
|
||||
model Env
|
||||
Integer x; // Pulsante premuto dall'utente
|
||||
Real r1024;
|
||||
Integer state1024[Modelica.Math.Random.Generators.Xorshift1024star.nState];
|
||||
algorithm
|
||||
when initial() then
|
||||
state1024 := Modelica.Math.Random.Generators.Xorshift1024star.initialState(614657, 30020);
|
||||
x := 0;
|
||||
r1024 := 0;
|
||||
elsewhen sample(0,1) then
|
||||
(r1024,state1024) := Modelica.Math.Random.Generators.Xorshift1024star.random(pre(state1024));
|
||||
if (r1024 <= 0.6) then x := 0; else x := 1; end if;
|
||||
end when;
|
||||
end Env;
|
||||
</pre>
|
3
legacy/Data/ingsw/0721_18/quest.txt
Normal file
3
legacy/Data/ingsw/0721_18/quest.txt
Normal file
|
@ -0,0 +1,3 @@
|
|||
L'input ad un sistema è costituito da un utente (umano) che preme due pulsanti etichettati con 0 ed 1.
|
||||
Con probabilità 0.6 l'utente preme il pulsante 0, con probabilità 0.4 l'utente preme il pulsante 1.
|
||||
Quale dei seguenti modelli Modelica fornisce un modello ragionevole per l'utente di cui sopra?
|
16
legacy/Data/ingsw/0721_18/wrong1.txt
Normal file
16
legacy/Data/ingsw/0721_18/wrong1.txt
Normal file
|
@ -0,0 +1,16 @@
|
|||
<pre>
|
||||
model Env
|
||||
Integer x; // Pulsante premuto dall'utente
|
||||
Real r1024;
|
||||
Integer state1024[Modelica.Math.Random.Generators.Xorshift1024star.nState];
|
||||
algorithm
|
||||
when initial() then
|
||||
state1024 := Modelica.Math.Random.Generators.Xorshift1024star.initialState(614657, 30020);
|
||||
x := 0;
|
||||
r1024 := 0;
|
||||
elsewhen sample(0,1) then
|
||||
(r1024,state1024) := Modelica.Math.Random.Generators.Xorshift1024star.random(pre(state1024));
|
||||
if (r1024 >= 0.6) then x := 0; else x := 1; end if;
|
||||
end when;
|
||||
end Env;
|
||||
</pre>
|
16
legacy/Data/ingsw/0721_18/wrong2.txt
Normal file
16
legacy/Data/ingsw/0721_18/wrong2.txt
Normal file
|
@ -0,0 +1,16 @@
|
|||
<pre>
|
||||
model Env
|
||||
Integer x; // Pulsante premuto dall'utente
|
||||
Real r1024;
|
||||
Integer state1024[Modelica.Math.Random.Generators.Xorshift1024star.nState];
|
||||
algorithm
|
||||
when initial() then
|
||||
state1024 := Modelica.Math.Random.Generators.Xorshift1024star.initialState(614657, 30020);
|
||||
x := 0;
|
||||
r1024 := 0;
|
||||
elsewhen sample(0,1) then
|
||||
(r1024,state1024) := Modelica.Math.Random.Generators.Xorshift1024star.random(pre(state1024));
|
||||
if (r1024 <= 0.6) then x := 1; else x := 0; end if;
|
||||
end when;
|
||||
end Env;
|
||||
</pre>
|
Loading…
Add table
Add a link
Reference in a new issue