夜市麻將模擬機2

夜市麻將模擬機2
几何画板及绘图内容加载中,请稍等……
2017-03-14 08:47
夜市麻將模擬機2是一個演示機率和最佳化問題的GeoGebra范例。它展示了如何使用機率來模擬麻將遊戲的結果。核心数学概念包括概率、減法和最佳化問題。作图要点包括使用Sequence、Element、KeepIf、Union、Intersection、Length、Div、Translate和Max等GeoGebra命令。這個范例適合中學生和初級大學生,尤其是那些正在學習概率和最佳化問題的學生。

GeoGebra 命令及参数

  1. Sequence(k, k, 1, 36) → list2
  2. Sequence(Random[1, 36 - k], k, 0, 14) → list1
  3. Element(list1, 1) → carte1
  4. KeepIf(x ≠ carte1, list2) → list3
  5. Element(list3, Element[list1, 2]) → carte2
  6. KeepIf(x ≠ carte2, list3) → list4
  7. Element(list4, Element[list1, 3]) → carte3
  8. KeepIf(x ≠ carte3, list4) → list5
  9. Element(list5, Element[list1, 4]) → carte4
  10. KeepIf(x ≠ carte4, list5) → list6
  11. Element(list6, Element[list1, 5]) → carte5
  12. KeepIf(x ≠ carte5, list6) → list7
  13. Element(list7, Element[list1, 6]) → carte6
  14. KeepIf(x ≠ carte6, list7) → list8
  15. Element(list8, Element[list1, 7]) → carte7
  16. KeepIf(x ≠ carte7, list8) → list9
  17. Element(list9, Element[list1, 8]) → carte8
  18. KeepIf(x ≠ carte8, list9) → list10
  19. Element(list10, Element[list1, 9]) → carte9
  20. KeepIf(x ≠ carte9, list10) → list11
  21. Element(list11, Element[list1, 10]) → carte10
  22. KeepIf(x ≠ carte10, list11) → list12
  23. Element(list12, Element[list1, 11]) → carte11
  24. KeepIf(x ≠ carte11, list12) → list13
  25. Element(list13, Element[list1, 12]) → carte12
  26. KeepIf(x ≠ carte12, list13) → list14
  27. Element(list14, Element[list1, 13]) → carte13
  28. KeepIf(x ≠ carte13, list14) → list15
  29. Element(list15, Element[list1, 14]) → carte14
  30. KeepIf(x ≠ carte14, list15) → list16
  31. Element(list16, Element[list1, 15]) → carte15
  32. KeepIf(x ≠ carte15, list16) → pu
  33. Sequence(Element[pu, (3 * k) - b2], k, 1, 7) → pu1
  34. Element(pu1, 7) → carte22
  35. Element(pu1, 1) → carte21
  36. Element(pu1, 6) → carte20
  37. Element(pu1, 2) → carte19
  38. Element(pu1, 5) → carte18
  39. Element(pu1, 3) → carte17
  40. Element(pu1, 4) → carte16
  41. Union(list0, v1) → u1
  42. Union(v2, u1) → u2
  43. Union(v3, u2) → u3
  44. Union(v4, u3) → u4
  45. Union(v5, u4) → u5
  46. Union(v6, u5) → u6
  47. Union(v7, u6) → u7
  48. Element(u, a + 1) → list00
  49. Intersection(s1, list00) → t1
  50. Length(list1) → n
  51. Div(Length[t1], 6) → n1
  52. Intersection(s2, list00) → t2
  53. Intersection(s3, list00) → t3
  54. Intersection(s4, list00) → t4
  55. Intersection(s5, list00) → t5
  56. Intersection(s6, list00) → t6
  57. Intersection(s7, list00) → t7
  58. Intersection(s8, list00) → t8
  59. Intersection(s9, list00) → t9
  60. Intersection(s10, list00) → t10
  61. Intersection(s11, list00) → t11
  62. Intersection(s12, list00) → t12
  63. Intersection(s13, list00) → t13
  64. Intersection(s14, list00) → t14
  65. Div(Length[t2], 6) → n2
  66. Div(Length[t3], 6) → n3
  67. Div(Length[t4], 6) → n4
  68. Div(Length[t5], 6) → n5
  69. Div(Length[t6], 6) → n6
  70. Div(Length[t7], 6) → n7
  71. Div(Length[t8], 6) → n8
  72. Div(Length[t9], 6) → n9
  73. Div(Length[t10], 6) → n10
  74. Div(Length[t11], 6) → n11
  75. Div(Length[t12], 6) → n12
  76. Div(Length[t13], 6) → n13
  77. Div(Length[t14], 6) → n14
  78. Translate(Element[cartes, carte1], Vector[(0, 0), ((Mod[carte1 - 1, 6] * 2), (Div[carte1 - 1, 6] * 2.8)) + B_3]) → cart1
  79. Translate(Element[cartes, carte2], Vector[(0, 0), ((Mod[carte2 - 1, 6] * 2), (Div[carte2 - 1, 6] * 2.8)) + B_3]) → cart2
  80. Translate(Element[cartes, carte3], Vector[(0, 0), ((Mod[carte3 - 1, 6] * 2), (Div[carte3 - 1, 6] * 2.8)) + B_3]) → cart3
  81. Translate(Element[cartes, carte4], Vector[(0, 0), ((Mod[carte4 - 1, 6] * 2), (Div[carte4 - 1, 6] * 2.8)) + B_3]) → cart4
  82. Translate(Element[cartes, carte5], Vector[(0, 0), ((Mod[carte5 - 1, 6] * 2), (Div[carte5 - 1, 6] * 2.8)) + B_3]) → cart5
  83. Translate(Element[cartes, carte6], Vector[(0, 0), ((Mod[carte6 - 1, 6] * 2), (Div[carte6 - 1, 6] * 2.8)) + B_3]) → cart6
  84. Translate(Element[cartes, carte7], Vector[(0, 0), ((Mod[carte7 - 1, 6] * 2), (Div[carte7 - 1, 6] * 2.8)) + B_3]) → cart7
  85. Translate(Element[cartes, carte8], Vector[(0, 0), ((Mod[carte8 - 1, 6] * 2), (Div[carte8 - 1, 6] * 2.8)) + B_3]) → cart8
  86. Translate(Element[cartes, carte9], Vector[(0, 0), ((Mod[carte9 - 1, 6] * 2), (Div[carte9 - 1, 6] * 2.8)) + B_3]) → cart9
  87. Translate(Element[cartes, carte10], Vector[(0, 0), ((Mod[carte10 - 1, 6] * 2), (Div[carte10 - 1, 6] * 2.8)) + B_3]) → cart10
  88. Translate(Element[cartes, carte11], Vector[(0, 0), ((Mod[carte11 - 1, 6] * 2), (Div[carte11 - 1, 6] * 2.8)) + B_3]) → cart11
  89. Translate(Element[cartes, carte12], Vector[(0, 0), ((Mod[carte12 - 1, 6] * 2), (Div[carte12 - 1, 6] * 2.8)) + B_3]) → cart12
  90. Translate(Element[cartes, carte13], Vector[(0, 0), ((Mod[carte13 - 1, 6] * 2), (Div[carte13 - 1, 6] * 2.8)) + B_3]) → cart13
  91. Translate(Element[cartes, carte14], Vector[(0, 0), ((Mod[carte14 - 1, 6] * 2), (Div[carte14 - 1, 6] * 2.8)) + B_3]) → cart14
  92. Translate(Element[cartes, carte15], Vector[(0, 0), ((Mod[carte15 - 1, 6] * 2), (Div[carte15 - 1, 6] * 2.8)) + B_3]) → cart15
  93. Translate(Element[cartes, carte16], Vector[(0, 0), ((Mod[carte16 - 1, 6] * 2), (Div[carte16 - 1, 6] * 2.8)) + B_3]) → pic39
  94. Translate(Element[cartes, carte17], Vector[(0, 0), ((Mod[carte17 - 1, 6] * 2), (Div[carte17 - 1, 6] * 2.8)) + B_3]) → cart17
  95. Translate(Element[cartes, carte18], Vector[(0, 0), ((Mod[carte18 - 1, 6] * 2), (Div[carte18 - 1, 6] * 2.8)) + B_3]) → cart18
  96. Translate(Element[cartes, carte19], Vector[(0, 0), ((Mod[carte19 - 1, 6] * 2), (Div[carte19 - 1, 6] * 2.8)) + B_3]) → cart19
  97. Translate(Element[cartes, carte20], Vector[(0, 0), ((Mod[carte20 - 1, 6] * 2), (Div[carte20 - 1, 6] * 2.8)) + B_3]) → cart20
  98. Translate(Element[cartes, carte21], Vector[(0, 0), ((Mod[carte21 - 1, 6] * 2), (Div[carte21 - 1, 6] * 2.8)) + B_3]) → cart21
  99. Element(q, a + 1) → k
  100. Translate(Element[cartes, carte22], Vector[(0, 0), ((Mod[carte22 - 1, 6] * 2), (Div[carte22 - 1, 6] * 2.8)) + B_3]) → cart22
  101. Max(0, m1) → m2
  102. Div(m1, 2000) → m3

AI 绘图提示语参考

画一组与麻将牌点数相关的随机选择过程:先生成1到36的整数序列,再在每一步从1到(36-当前数)之间随机抽取到一组候选位置,并依次剔除已选中的位置,得到多次保留后的若干“牌点”结果(可理解为连续抽牌后的不同位置)。随后从其中一个保留结果里按7个偏移取出7个对应的牌点,并再对应地取出另一组7个编号位置。最后把两条序列依次合并成同一个总列表,再从该总列表中取出从指定起点起的第a+1项,用于表示最终的抽取结果集合。
以上提示语为根据原始绘图命令整理而来,仅供参考。