Advertisement
_PoY

[YGOFM] find_best_combo_in_ai_hand tests

Feb 28th, 2025
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 9.32 KB | None | 0 0
  1. tests = [
  2.         {  # 1-card combo
  3.             'board_card': None,
  4.             'hand_names': [
  5.                 'Gate Guardian',
  6.                 'Blue-eyes Ultimate Dragon',
  7.                 'Zera The Mant',
  8.                 'Cosmo Queen',
  9.                 'Blue-eyes Ultimate Dragon',
  10.             ],
  11.             'field': None,
  12.             'max_fusion_length': 3,
  13.             'exp_result_name': 'Blue-eyes Ultimate Dragon',
  14.             'exp_ordering': [1],
  15.             'exp_equip_stage': 0,
  16.             'exp_result_max_stat': 4_500
  17.         },
  18.         {  # 1-card combo, field shouldn't matter (.1)
  19.             'board_card': None,
  20.             'hand_names': [
  21.                 'Twin-headed Thunder Dragon',
  22.                 'Dark Magician',
  23.                 'Zera The Mant',
  24.                 'Cosmo Queen',
  25.                 'B. Skull Dragon',
  26.             ],
  27.             'field': 'Yami',
  28.             'max_fusion_length': 3,
  29.             'exp_result_name': 'B. Skull Dragon',
  30.             'exp_ordering': [4],
  31.             'exp_equip_stage': 0,
  32.             'exp_result_max_stat': 3_200
  33.         },
  34.         {  # 1-card combo, field shouldn't matter (.2)
  35.             'board_card': None,
  36.             'hand_names': [
  37.                 'Twin-headed Thunder Dragon',
  38.                 'Dark Magician',
  39.                 'Zera The Mant',
  40.                 'B. Skull Dragon',
  41.                 'Cosmo Queen',
  42.             ],
  43.             'field': 'Umi',
  44.             'max_fusion_length': 3,
  45.             'exp_result_name': 'B. Skull Dragon',
  46.             'exp_ordering': [3],
  47.             'exp_equip_stage': 0,
  48.             'exp_result_max_stat': 3_200
  49.         },
  50.         {  # 2-card combo, field shouldn't matter (.2)
  51.             'board_card': None,
  52.             'hand_names': [
  53.                 'Twin-headed Thunder Dragon',
  54.                 'Dark Magician',
  55.                 'Zera The Mant',
  56.                 'B. Skull Dragon',
  57.                 'Cosmo Queen',
  58.             ],
  59.             'field': 'Umi',
  60.             'max_fusion_length': 3,
  61.             'exp_result_name': 'B. Skull Dragon',
  62.             'exp_ordering': [3],
  63.             'exp_equip_stage': 0,
  64.             'exp_result_max_stat': 3_200
  65.         },
  66.         {  # 3-card combo
  67.             'board_card': None,
  68.             'hand_names': [
  69.                 'Flame Ghost',
  70.                 'Petit Dragon',
  71.                 'Niwatori',
  72.                 'Air Marmot of Nefariousness',
  73.                 'Niwatori',
  74.             ],
  75.             'field': None,
  76.             'max_fusion_length': 3,
  77.             'exp_result_name': 'Crimson Sunbird',
  78.             'exp_ordering': [0, 2, 4],
  79.             'exp_equip_stage': 0,
  80.             'exp_result_max_stat': 2_300
  81.         },
  82.         {  # 2-card combo due to max_fusion_length being reached
  83.             'board_card': None,
  84.             'hand_names': [
  85.                 'Flame Ghost',
  86.                 'Petit Dragon',
  87.                 'Niwatori',
  88.                 'Air Marmot of Nefariousness',
  89.                 'Niwatori',
  90.             ],
  91.             'field': None,
  92.             'max_fusion_length': 2,
  93.             'exp_result_name': 'Flame Cerebrus',
  94.             'exp_ordering': [0, 3],
  95.             'exp_equip_stage': 0,
  96.             'exp_result_max_stat': 2_100
  97.         },
  98.         {  # Equip due to 2-card combo having priority over 1-card combo thanks to earlier card
  99.             'board_card': None,
  100.             'hand_names': [
  101.                 'Megamorph',
  102.                 'Gate Guardian',
  103.                 'Turtle Tiger',
  104.                 'Niwatori',
  105.                 'Firegrass',
  106.             ],
  107.             'field': None,
  108.             'max_fusion_length': 3,
  109.             'exp_result_name': 'Gate Guardian',
  110.             'exp_ordering': [0, 1],
  111.             'exp_equip_stage': 2,
  112.             'exp_result_max_stat': 3_750
  113.         },
  114.         {  # No equip due to 2-card & 3-card combos comparison
  115.             'board_card': None,
  116.             'hand_names': [
  117.                 'Megamorph',
  118.                 'Mavelus',
  119.                 'Turtle Tiger',
  120.                 'Niwatori',
  121.                 'Firegrass',
  122.             ],
  123.             'field': None,
  124.             'max_fusion_length': 3,
  125.             'exp_result_name': 'Crimson Sunbird',
  126.             'exp_ordering': [1, 3],
  127.             'exp_equip_stage': 0,
  128.             'exp_result_max_stat': 2_300
  129.         },
  130.         {  # Equip thanks to field
  131.             'board_card': None,
  132.             'hand_names': [
  133.                 'Cosmo Queen',
  134.                 'B. Skull Dragon',
  135.                 'Megamorph',
  136.                 'Megamorph',
  137.                 'Zoa',
  138.             ],
  139.             'field': 'Yami',
  140.             'max_fusion_length': 3,
  141.             'exp_result_name': 'Cosmo Queen',
  142.             'exp_ordering': [0, 2],
  143.             'exp_equip_stage': 2,
  144.             'exp_result_max_stat': 3_400
  145.         },
  146.         {  # Equip from field combo
  147.             'board_card': None,
  148.             'hand_names': [
  149.                 'Zoa',
  150.                 'Yami',
  151.                 'Skull Knight',
  152.                 'Twin-headed Thunder Dragon',
  153.                 'Yami',
  154.             ],
  155.             'field': None,
  156.             'max_fusion_length': 3,
  157.             'exp_result_name': 'Twin-headed Thunder Dragon',
  158.             'exp_ordering': [1, 4, 3],
  159.             'exp_equip_stage': 1,
  160.             'exp_result_max_stat': 2_800
  161.         },
  162.         {  # Equip from field combo and field
  163.             'board_card': None,
  164.             'hand_names': [
  165.                 'Twin-headed Thunder Dragon',
  166.                 'Skull Knight',
  167.                 'Zoa',
  168.                 'Yami',
  169.                 'Yami',
  170.             ],
  171.             'field': 'Yami',
  172.             'max_fusion_length': 3,
  173.             'exp_result_name': 'Skull Knight',
  174.             'exp_ordering': [3, 4, 1],
  175.             'exp_equip_stage': 1,
  176.             'exp_result_max_stat': 3_150
  177.         },
  178.         {  # Different equip from field combo
  179.             'board_card': None,
  180.             'hand_names': [
  181.                 'Twin-headed Thunder Dragon',
  182.                 'Skull Knight',
  183.                 'Zoa',
  184.                 'Yami',
  185.                 'Yami',
  186.             ],
  187.             'field': None,
  188.             'max_fusion_length': 3,
  189.             'exp_result_name': 'Twin-headed Thunder Dragon',
  190.             'exp_ordering': [0],
  191.             'exp_equip_stage': 0,
  192.             'exp_result_max_stat': 2_800
  193.         },
  194.  
  195.         {  # Board fusion with no ambiguity
  196.             'board_card': {'name': 'Skull Red Bird', 'pos': 0, 'equip_stage': 0},
  197.             'hand_names': [
  198.                 'Armed Ninja',
  199.                 'Petit Dragon',
  200.                 'Vermillion Sparrow',
  201.                 'Tripwire Beast',
  202.                 'Ameba',
  203.             ],
  204.             'field': None,
  205.             'max_fusion_length': 2,
  206.             'exp_result_name': 'Crimson Sunbird',
  207.             'exp_ordering': [HACK_BOARD_POS, 2],
  208.             'exp_equip_stage': 0,
  209.             'exp_result_max_stat': 2_300
  210.         },
  211.         {  # Board fusion with 3-card hand combo ambiguity
  212.             'board_card': {'name': 'Skull Red Bird', 'pos': 0, 'equip_stage': 0},
  213.             'hand_names': [
  214.                 'Armed Ninja',
  215.                 'Petit Dragon',
  216.                 'Vermillion Sparrow',
  217.                 'Tripwire Beast',
  218.                 'Ameba',
  219.             ],
  220.             'field': None,
  221.             'max_fusion_length': 3,
  222.             'exp_result_name': 'Crimson Sunbird',
  223.             'exp_ordering': [HACK_BOARD_POS, 2],
  224.             'exp_equip_stage': 0,
  225.             'exp_result_max_stat': 2_300
  226.         },
  227.  
  228.         {  # Keep board card as is
  229.             'board_card': {'name': 'Blue-eyes White Dragon', 'pos': 0, 'equip_stage': 0},
  230.             'hand_names': [
  231.                 'Armed Ninja',
  232.                 'Bright Castle',
  233.                 'Vermillion Sparrow',
  234.                 'Tripwire Beast',
  235.                 'Ameba',
  236.             ],
  237.             'field': None,
  238.             'max_fusion_length': 3,
  239.             'exp_result_name': 'Blue-eyes White Dragon',
  240.             'exp_ordering': [HACK_BOARD_POS],
  241.             'exp_equip_stage': 0,
  242.             'exp_result_max_stat': 3_000
  243.         },
  244.         {  # Improve board card
  245.             'board_card': {'name': 'Blue-eyes White Dragon', 'pos': 0, 'equip_stage': -1},
  246.             'hand_names': [
  247.                 'Armed Ninja',
  248.                 'Bright Castle',
  249.                 'Vermillion Sparrow',
  250.                 'Tripwire Beast',
  251.                 'Ameba',
  252.             ],
  253.             'field': None,
  254.             'max_fusion_length': 2,
  255.             'exp_result_name': 'Blue-eyes White Dragon',
  256.             'exp_ordering': [HACK_BOARD_POS, 1],
  257.             'exp_equip_stage': 0,
  258.             'exp_result_max_stat': 3_000
  259.         },
  260.  
  261.         {  # No combo due to hand and board cards having the same position
  262.             'board_card': {'name': 'Blue-eyes White Dragon', 'pos': 0, 'equip_stage': -1},
  263.             'hand_names': [
  264.                 'Bright Castle',
  265.                 'Armed Ninja',
  266.                 'Vermillion Sparrow',
  267.                 'Tripwire Beast',
  268.                 'Ameba',
  269.             ],
  270.             'field': None,
  271.             'max_fusion_length': 2,
  272.             'exp_result_name': 'Blue-eyes White Dragon',
  273.             'exp_ordering': [HACK_BOARD_POS],
  274.             'exp_equip_stage': -1,
  275.             'exp_result_max_stat': 2_500
  276.         },
  277.     ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement