From e7601a0f054e3ff5475346c4164fb86e15a8854f Mon Sep 17 00:00:00 2001 From: Maxime MORGE <maxime.morge@univ-lille.fr> Date: Tue, 18 Mar 2025 21:47:22 +0100 Subject: [PATCH] Dictator Consistency --- .idea/csv-editor.xml | 70 + data/dictator/dictator_consistency.csv | 121 ++ figures/dictator/dictator_consistency.svg | 1132 +++++++++++++++++ src/dictator/dictator_consistency.py | 162 +-- .../dictator_consistency_experiments.py | 37 + src/dictator/draw_consistency_draw.py | 44 + 6 files changed, 1489 insertions(+), 77 deletions(-) create mode 100644 data/dictator/dictator_consistency.csv create mode 100644 figures/dictator/dictator_consistency.svg create mode 100644 src/dictator/dictator_consistency_experiments.py create mode 100644 src/dictator/draw_consistency_draw.py diff --git a/.idea/csv-editor.xml b/.idea/csv-editor.xml index f5717c0..e5835c3 100644 --- a/.idea/csv-editor.xml +++ b/.idea/csv-editor.xml @@ -10,6 +10,13 @@ </Attribute> </value> </entry> + <entry key="$PROJECT_DIR$/data/dictator/dictator_continuous_setup.csv"> + <value> + <Attribute> + <option name="separator" value="," /> + </Attribute> + </value> + </entry> <entry key="$PROJECT_DIR$/data/dictator/dictator_setup.csv"> <value> <Attribute> @@ -101,6 +108,20 @@ </Attribute> </value> </entry> + <entry key="$PROJECT_DIR$/data/dictator/dictator.csv"> + <value> + <Attribute> + <option name="separator" value="," /> + </Attribute> + </value> + </entry> + <entry key="$PROJECT_DIR$/data/dictator/dictator_consistency.csv"> + <value> + <Attribute> + <option name="separator" value="," /> + </Attribute> + </value> + </entry> <entry key="$PROJECT_DIR$/data/dictator/dictator_continuous_setup.csv"> <value> <Attribute> @@ -115,6 +136,55 @@ </Attribute> </value> </entry> + <entry key="$PROJECT_DIR$/data/guess/guess.csv"> + <value> + <Attribute> + <option name="separator" value="," /> + </Attribute> + </value> + </entry> + <entry key="$PROJECT_DIR$/data/ring/ring.1.a.csv"> + <value> + <Attribute> + <option name="separator" value="," /> + </Attribute> + </value> + </entry> + <entry key="$PROJECT_DIR$/data/ring/ring.1.b.csv"> + <value> + <Attribute> + <option name="separator" value="," /> + </Attribute> + </value> + </entry> + <entry key="$PROJECT_DIR$/data/ring/ring.1.c.csv"> + <value> + <Attribute> + <option name="separator" value="," /> + </Attribute> + </value> + </entry> + <entry key="$PROJECT_DIR$/data/ring/ring.1.d.csv"> + <value> + <Attribute> + <option name="separator" value="," /> + </Attribute> + </value> + </entry> + <entry key="$PROJECT_DIR$/data/ring/ring.2.a.csv"> + <value> + <Attribute> + <option name="separator" value="," /> + </Attribute> + </value> + </entry> + <entry key="$PROJECT_DIR$/data/rps/rps.csv"> + <value> + <Attribute> + <option name="separator" value="," /> + </Attribute> + </value> + </entry> </map> </option> </component> diff --git a/data/dictator/dictator_consistency.csv b/data/dictator/dictator_consistency.csv new file mode 100644 index 0000000..32a1eff --- /dev/null +++ b/data/dictator/dictator_consistency.csv @@ -0,0 +1,121 @@ +iteration,model,temperature,ccei +1,random,0.0,0.3519 +2,random,0.0,0.3338 +3,random,0.0,0.1623 +4,random,0.0,0.3429 +5,random,0.0,0.171 +6,random,0.0,0.2451 +7,random,0.0,0.4368 +8,random,0.0,0.2843 +9,random,0.0,0.1131 +10,random,0.0,0.197 +11,random,0.0,0.1562 +12,random,0.0,0.1362 +13,random,0.0,0.1057 +14,random,0.0,0.281 +15,random,0.0,0.224 +16,random,0.0,0.1506 +17,random,0.0,0.2145 +18,random,0.0,0.2451 +19,random,0.0,0.3756 +20,random,0.0,0.237 +21,random,0.0,0.2618 +22,random,0.0,0.2222 +23,random,0.0,0.2669 +24,random,0.0,0.16 +25,random,0.0,0.3 +26,random,0.0,0.2451 +27,random,0.0,0.1736 +28,random,0.0,0.2816 +29,random,0.0,0.2342 +30,random,0.0,0.4048 +1,llama3,0.0,0.3504 +2,llama3,0.0,0.3424 +3,llama3,0.0,0.241 +4,llama3,0.0,0.137 +5,llama3,0.0,0.6632 +6,llama3,0.0,0.4808 +7,llama3,0.0,0.3 +8,llama3,0.0,0.5455 +9,llama3,0.0,0.3675 +10,llama3,0.0,0.4436 +11,llama3,0.0,0.4286 +12,llama3,0.0,0.1593 +13,llama3,0.0,0.3636 +14,llama3,0.0,0.3553 +15,llama3,0.0,0.3212 +16,llama3,0.0,0.3636 +17,llama3,0.0,0.1953 +18,llama3,0.0,0.2045 +19,llama3,0.0,0.137 +20,llama3,0.0,0.2308 +21,llama3,0.0,0.2576 +22,llama3,0.0,0.2195 +23,llama3,0.0,0.2195 +24,llama3,0.0,0.3553 +25,llama3,0.0,0.3455 +26,llama3,0.0,0.3333 +27,llama3,0.0,0.3636 +28,llama3,0.0,0.2 +29,llama3,0.0,0.4231 +30,llama3,0.0,0.3265 +1,mistral-small,0.0,0.2596 +2,mistral-small,0.0,0.3241 +3,mistral-small,0.0,0.1628 +4,mistral-small,0.0,0.272 +5,mistral-small,0.0,0.3239 +6,mistral-small,0.0,0.216 +7,mistral-small,0.0,0.216 +8,mistral-small,0.0,0.28 +9,mistral-small,0.0,0.4 +10,mistral-small,0.0,0.2956 +11,mistral-small,0.0,0.3538 +12,mistral-small,0.0,0.3526 +13,mistral-small,0.0,0.283 +14,mistral-small,0.0,0.322 +15,mistral-small,0.0,0.216 +16,mistral-small,0.0,0.2039 +17,mistral-small,0.0,0.4277 +18,mistral-small,0.0,0.2174 +19,mistral-small,0.0,0.1765 +20,mistral-small,0.0,0.371 +21,mistral-small,0.0,0.2653 +22,mistral-small,0.0,0.3261 +23,mistral-small,0.0,0.3 +24,mistral-small,0.0,0.194 +25,mistral-small,0.0,0.2364 +26,mistral-small,0.0,0.3284 +27,mistral-small,0.0,0.2364 +28,mistral-small,0.0,0.2131 +29,mistral-small,0.0,0.1741 +30,mistral-small,0.0,0.4348 +1,deepseek-r1,0.0,0.3913 +2,deepseek-r1,0.0,0.1425 +3,deepseek-r1,0.0,0.1582 +4,deepseek-r1,0.0,0.1111 +5,deepseek-r1,0.0,0.2725 +6,deepseek-r1,0.0,0.2083 +7,deepseek-r1,0.0,0.3168 +8,deepseek-r1,0.0,0.1 +9,deepseek-r1,0.0,0.1709 +10,deepseek-r1,0.0,0.1009 +11,deepseek-r1,0.0,0.1556 +12,deepseek-r1,0.0,0.1639 +13,deepseek-r1,0.0,0.2 +14,deepseek-r1,0.0,0.1493 +15,deepseek-r1,0.0,0.1825 +16,deepseek-r1,0.0,0.64 +17,deepseek-r1,0.0,0.2875 +18,deepseek-r1,0.0,0.25 +19,deepseek-r1,0.0,0.1111 +20,deepseek-r1,0.0,0.1028 +21,deepseek-r1,0.0,0.2558 +22,deepseek-r1,0.0,0.3636 +23,deepseek-r1,0.0,0.2656 +24,deepseek-r1,0.0,0.133 +25,deepseek-r1,0.0,0.1835 +26,deepseek-r1,0.0,0.3322 +27,deepseek-r1,0.0,0.3137 +28,deepseek-r1,0.0,0.1099 +29,deepseek-r1,0.0,0.3066 +30,deepseek-r1,0.0,0.1761 diff --git a/figures/dictator/dictator_consistency.svg b/figures/dictator/dictator_consistency.svg new file mode 100644 index 0000000..b2f50fd --- /dev/null +++ b/figures/dictator/dictator_consistency.svg @@ -0,0 +1,1132 @@ +<?xml version="1.0" encoding="utf-8" standalone="no"?> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" + "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<svg xmlns:xlink="http://www.w3.org/1999/xlink" width="720pt" height="432pt" viewBox="0 0 720 432" xmlns="http://www.w3.org/2000/svg" version="1.1"> + <metadata> + <rdf:RDF xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> + <cc:Work> + <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/> + <dc:date>2025-03-18T21:46:41.228780</dc:date> + <dc:format>image/svg+xml</dc:format> + <dc:creator> + <cc:Agent> + <dc:title>Matplotlib v3.10.0, https://matplotlib.org/</dc:title> + </cc:Agent> + </dc:creator> + </cc:Work> + </rdf:RDF> + </metadata> + <defs> + <style type="text/css">*{stroke-linejoin: round; stroke-linecap: butt}</style> + </defs> + <g id="figure_1"> + <g id="patch_1"> + <path d="M 0 432 +L 720 432 +L 720 0 +L 0 0 +z +" style="fill: #ffffff"/> + </g> + <g id="axes_1"> + <g id="patch_2"> + <path d="M 90 384.48 +L 648 384.48 +L 648 51.84 +L 90 51.84 +z +" style="fill: #ffffff"/> + </g> + <g id="matplotlib.axis_1"> + <g id="xtick_1"> + <g id="text_1"> + <!-- random --> + <g style="fill: #262626" transform="translate(143.200409 414.133865) rotate(-20) scale(0.11 -0.11)"> + <defs> + <path id="ArialMT-72" d="M 416 0 +L 416 3319 +L 922 3319 +L 922 2816 +Q 1116 3169 1280 3281 +Q 1444 3394 1641 3394 +Q 1925 3394 2219 3213 +L 2025 2691 +Q 1819 2813 1613 2813 +Q 1428 2813 1281 2702 +Q 1134 2591 1072 2394 +Q 978 2094 978 1738 +L 978 0 +L 416 0 +z +" transform="scale(0.015625)"/> + <path id="ArialMT-61" d="M 2588 409 +Q 2275 144 1986 34 +Q 1697 -75 1366 -75 +Q 819 -75 525 192 +Q 231 459 231 875 +Q 231 1119 342 1320 +Q 453 1522 633 1644 +Q 813 1766 1038 1828 +Q 1203 1872 1538 1913 +Q 2219 1994 2541 2106 +Q 2544 2222 2544 2253 +Q 2544 2597 2384 2738 +Q 2169 2928 1744 2928 +Q 1347 2928 1158 2789 +Q 969 2650 878 2297 +L 328 2372 +Q 403 2725 575 2942 +Q 747 3159 1072 3276 +Q 1397 3394 1825 3394 +Q 2250 3394 2515 3294 +Q 2781 3194 2906 3042 +Q 3031 2891 3081 2659 +Q 3109 2516 3109 2141 +L 3109 1391 +Q 3109 606 3145 398 +Q 3181 191 3288 0 +L 2700 0 +Q 2613 175 2588 409 +z +M 2541 1666 +Q 2234 1541 1622 1453 +Q 1275 1403 1131 1340 +Q 988 1278 909 1158 +Q 831 1038 831 891 +Q 831 666 1001 516 +Q 1172 366 1500 366 +Q 1825 366 2078 508 +Q 2331 650 2450 897 +Q 2541 1088 2541 1459 +L 2541 1666 +z +" transform="scale(0.015625)"/> + <path id="ArialMT-6e" d="M 422 0 +L 422 3319 +L 928 3319 +L 928 2847 +Q 1294 3394 1984 3394 +Q 2284 3394 2536 3286 +Q 2788 3178 2913 3003 +Q 3038 2828 3088 2588 +Q 3119 2431 3119 2041 +L 3119 0 +L 2556 0 +L 2556 2019 +Q 2556 2363 2490 2533 +Q 2425 2703 2258 2804 +Q 2091 2906 1866 2906 +Q 1506 2906 1245 2678 +Q 984 2450 984 1813 +L 984 0 +L 422 0 +z +" transform="scale(0.015625)"/> + <path id="ArialMT-64" d="M 2575 0 +L 2575 419 +Q 2259 -75 1647 -75 +Q 1250 -75 917 144 +Q 584 363 401 755 +Q 219 1147 219 1656 +Q 219 2153 384 2558 +Q 550 2963 881 3178 +Q 1213 3394 1622 3394 +Q 1922 3394 2156 3267 +Q 2391 3141 2538 2938 +L 2538 4581 +L 3097 4581 +L 3097 0 +L 2575 0 +z +M 797 1656 +Q 797 1019 1065 703 +Q 1334 388 1700 388 +Q 2069 388 2326 689 +Q 2584 991 2584 1609 +Q 2584 2291 2321 2609 +Q 2059 2928 1675 2928 +Q 1300 2928 1048 2622 +Q 797 2316 797 1656 +z +" transform="scale(0.015625)"/> + <path id="ArialMT-6f" d="M 213 1659 +Q 213 2581 725 3025 +Q 1153 3394 1769 3394 +Q 2453 3394 2887 2945 +Q 3322 2497 3322 1706 +Q 3322 1066 3130 698 +Q 2938 331 2570 128 +Q 2203 -75 1769 -75 +Q 1072 -75 642 372 +Q 213 819 213 1659 +z +M 791 1659 +Q 791 1022 1069 705 +Q 1347 388 1769 388 +Q 2188 388 2466 706 +Q 2744 1025 2744 1678 +Q 2744 2294 2464 2611 +Q 2184 2928 1769 2928 +Q 1347 2928 1069 2612 +Q 791 2297 791 1659 +z +" transform="scale(0.015625)"/> + <path id="ArialMT-6d" d="M 422 0 +L 422 3319 +L 925 3319 +L 925 2853 +Q 1081 3097 1340 3245 +Q 1600 3394 1931 3394 +Q 2300 3394 2536 3241 +Q 2772 3088 2869 2813 +Q 3263 3394 3894 3394 +Q 4388 3394 4653 3120 +Q 4919 2847 4919 2278 +L 4919 0 +L 4359 0 +L 4359 2091 +Q 4359 2428 4304 2576 +Q 4250 2725 4106 2815 +Q 3963 2906 3769 2906 +Q 3419 2906 3187 2673 +Q 2956 2441 2956 1928 +L 2956 0 +L 2394 0 +L 2394 2156 +Q 2394 2531 2256 2718 +Q 2119 2906 1806 2906 +Q 1569 2906 1367 2781 +Q 1166 2656 1075 2415 +Q 984 2175 984 1722 +L 984 0 +L 422 0 +z +" transform="scale(0.015625)"/> + </defs> + <use xlink:href="#ArialMT-72"/> + <use xlink:href="#ArialMT-61" transform="translate(33.300781 0)"/> + <use xlink:href="#ArialMT-6e" transform="translate(88.916016 0)"/> + <use xlink:href="#ArialMT-64" transform="translate(144.53125 0)"/> + <use xlink:href="#ArialMT-6f" transform="translate(200.146484 0)"/> + <use xlink:href="#ArialMT-6d" transform="translate(255.761719 0)"/> + </g> + </g> + </g> + <g id="xtick_2"> + <g id="text_2"> + <!-- llama3 --> + <g style="fill: #262626" transform="translate(284.998692 412.460852) rotate(-20) scale(0.11 -0.11)"> + <defs> + <path id="ArialMT-6c" d="M 409 0 +L 409 4581 +L 972 4581 +L 972 0 +L 409 0 +z +" transform="scale(0.015625)"/> + <path id="ArialMT-33" d="M 269 1209 +L 831 1284 +Q 928 806 1161 595 +Q 1394 384 1728 384 +Q 2125 384 2398 659 +Q 2672 934 2672 1341 +Q 2672 1728 2419 1979 +Q 2166 2231 1775 2231 +Q 1616 2231 1378 2169 +L 1441 2663 +Q 1497 2656 1531 2656 +Q 1891 2656 2178 2843 +Q 2466 3031 2466 3422 +Q 2466 3731 2256 3934 +Q 2047 4138 1716 4138 +Q 1388 4138 1169 3931 +Q 950 3725 888 3313 +L 325 3413 +Q 428 3978 793 4289 +Q 1159 4600 1703 4600 +Q 2078 4600 2393 4439 +Q 2709 4278 2876 4000 +Q 3044 3722 3044 3409 +Q 3044 3113 2884 2869 +Q 2725 2625 2413 2481 +Q 2819 2388 3044 2092 +Q 3269 1797 3269 1353 +Q 3269 753 2831 336 +Q 2394 -81 1725 -81 +Q 1122 -81 723 278 +Q 325 638 269 1209 +z +" transform="scale(0.015625)"/> + </defs> + <use xlink:href="#ArialMT-6c"/> + <use xlink:href="#ArialMT-6c" transform="translate(22.216797 0)"/> + <use xlink:href="#ArialMT-61" transform="translate(44.433594 0)"/> + <use xlink:href="#ArialMT-6d" transform="translate(100.048828 0)"/> + <use xlink:href="#ArialMT-61" transform="translate(183.349609 0)"/> + <use xlink:href="#ArialMT-33" transform="translate(238.964844 0)"/> + </g> + </g> + </g> + <g id="xtick_3"> + <g id="text_3"> + <!-- mistral-small --> + <g style="fill: #262626" transform="translate(410.725147 422.487172) rotate(-20) scale(0.11 -0.11)"> + <defs> + <path id="ArialMT-69" d="M 425 3934 +L 425 4581 +L 988 4581 +L 988 3934 +L 425 3934 +z +M 425 0 +L 425 3319 +L 988 3319 +L 988 0 +L 425 0 +z +" transform="scale(0.015625)"/> + <path id="ArialMT-73" d="M 197 991 +L 753 1078 +Q 800 744 1014 566 +Q 1228 388 1613 388 +Q 2000 388 2187 545 +Q 2375 703 2375 916 +Q 2375 1106 2209 1216 +Q 2094 1291 1634 1406 +Q 1016 1563 777 1677 +Q 538 1791 414 1992 +Q 291 2194 291 2438 +Q 291 2659 392 2848 +Q 494 3038 669 3163 +Q 800 3259 1026 3326 +Q 1253 3394 1513 3394 +Q 1903 3394 2198 3281 +Q 2494 3169 2634 2976 +Q 2775 2784 2828 2463 +L 2278 2388 +Q 2241 2644 2061 2787 +Q 1881 2931 1553 2931 +Q 1166 2931 1000 2803 +Q 834 2675 834 2503 +Q 834 2394 903 2306 +Q 972 2216 1119 2156 +Q 1203 2125 1616 2013 +Q 2213 1853 2448 1751 +Q 2684 1650 2818 1456 +Q 2953 1263 2953 975 +Q 2953 694 2789 445 +Q 2625 197 2315 61 +Q 2006 -75 1616 -75 +Q 969 -75 630 194 +Q 291 463 197 991 +z +" transform="scale(0.015625)"/> + <path id="ArialMT-74" d="M 1650 503 +L 1731 6 +Q 1494 -44 1306 -44 +Q 1000 -44 831 53 +Q 663 150 594 308 +Q 525 466 525 972 +L 525 2881 +L 113 2881 +L 113 3319 +L 525 3319 +L 525 4141 +L 1084 4478 +L 1084 3319 +L 1650 3319 +L 1650 2881 +L 1084 2881 +L 1084 941 +Q 1084 700 1114 631 +Q 1144 563 1211 522 +Q 1278 481 1403 481 +Q 1497 481 1650 503 +z +" transform="scale(0.015625)"/> + <path id="ArialMT-2d" d="M 203 1375 +L 203 1941 +L 1931 1941 +L 1931 1375 +L 203 1375 +z +" transform="scale(0.015625)"/> + </defs> + <use xlink:href="#ArialMT-6d"/> + <use xlink:href="#ArialMT-69" transform="translate(83.300781 0)"/> + <use xlink:href="#ArialMT-73" transform="translate(105.517578 0)"/> + <use xlink:href="#ArialMT-74" transform="translate(155.517578 0)"/> + <use xlink:href="#ArialMT-72" transform="translate(183.300781 0)"/> + <use xlink:href="#ArialMT-61" transform="translate(216.601562 0)"/> + <use xlink:href="#ArialMT-6c" transform="translate(272.216797 0)"/> + <use xlink:href="#ArialMT-2d" transform="translate(294.433594 0)"/> + <use xlink:href="#ArialMT-73" transform="translate(327.734375 0)"/> + <use xlink:href="#ArialMT-6d" transform="translate(377.734375 0)"/> + <use xlink:href="#ArialMT-61" transform="translate(461.035156 0)"/> + <use xlink:href="#ArialMT-6c" transform="translate(516.650391 0)"/> + <use xlink:href="#ArialMT-6c" transform="translate(538.867188 0)"/> + </g> + </g> + </g> + <g id="xtick_4"> + <g id="text_4"> + <!-- deepseek-r1 --> + <g style="fill: #262626" transform="translate(550.499645 422.322106) rotate(-20) scale(0.11 -0.11)"> + <defs> + <path id="ArialMT-65" d="M 2694 1069 +L 3275 997 +Q 3138 488 2766 206 +Q 2394 -75 1816 -75 +Q 1088 -75 661 373 +Q 234 822 234 1631 +Q 234 2469 665 2931 +Q 1097 3394 1784 3394 +Q 2450 3394 2872 2941 +Q 3294 2488 3294 1666 +Q 3294 1616 3291 1516 +L 816 1516 +Q 847 969 1125 678 +Q 1403 388 1819 388 +Q 2128 388 2347 550 +Q 2566 713 2694 1069 +z +M 847 1978 +L 2700 1978 +Q 2663 2397 2488 2606 +Q 2219 2931 1791 2931 +Q 1403 2931 1139 2672 +Q 875 2413 847 1978 +z +" transform="scale(0.015625)"/> + <path id="ArialMT-70" d="M 422 -1272 +L 422 3319 +L 934 3319 +L 934 2888 +Q 1116 3141 1344 3267 +Q 1572 3394 1897 3394 +Q 2322 3394 2647 3175 +Q 2972 2956 3137 2557 +Q 3303 2159 3303 1684 +Q 3303 1175 3120 767 +Q 2938 359 2589 142 +Q 2241 -75 1856 -75 +Q 1575 -75 1351 44 +Q 1128 163 984 344 +L 984 -1272 +L 422 -1272 +z +M 931 1641 +Q 931 1000 1190 694 +Q 1450 388 1819 388 +Q 2194 388 2461 705 +Q 2728 1022 2728 1688 +Q 2728 2322 2467 2637 +Q 2206 2953 1844 2953 +Q 1484 2953 1207 2617 +Q 931 2281 931 1641 +z +" transform="scale(0.015625)"/> + <path id="ArialMT-6b" d="M 425 0 +L 425 4581 +L 988 4581 +L 988 1969 +L 2319 3319 +L 3047 3319 +L 1778 2088 +L 3175 0 +L 2481 0 +L 1384 1697 +L 988 1316 +L 988 0 +L 425 0 +z +" transform="scale(0.015625)"/> + <path id="ArialMT-31" d="M 2384 0 +L 1822 0 +L 1822 3584 +Q 1619 3391 1289 3197 +Q 959 3003 697 2906 +L 697 3450 +Q 1169 3672 1522 3987 +Q 1875 4303 2022 4600 +L 2384 4600 +L 2384 0 +z +" transform="scale(0.015625)"/> + </defs> + <use xlink:href="#ArialMT-64"/> + <use xlink:href="#ArialMT-65" transform="translate(55.615234 0)"/> + <use xlink:href="#ArialMT-65" transform="translate(111.230469 0)"/> + <use xlink:href="#ArialMT-70" transform="translate(166.845703 0)"/> + <use xlink:href="#ArialMT-73" transform="translate(222.460938 0)"/> + <use xlink:href="#ArialMT-65" transform="translate(272.460938 0)"/> + <use xlink:href="#ArialMT-65" transform="translate(328.076172 0)"/> + <use xlink:href="#ArialMT-6b" transform="translate(383.691406 0)"/> + <use xlink:href="#ArialMT-2d" transform="translate(433.691406 0)"/> + <use xlink:href="#ArialMT-72" transform="translate(466.992188 0)"/> + <use xlink:href="#ArialMT-31" transform="translate(500.292969 0)"/> + </g> + </g> + </g> + <g id="text_5"> + <!-- Model --> + <g style="fill: #262626" transform="translate(352.659375 437.13095) scale(0.12 -0.12)"> + <defs> + <path id="ArialMT-4d" d="M 475 0 +L 475 4581 +L 1388 4581 +L 2472 1338 +Q 2622 884 2691 659 +Q 2769 909 2934 1394 +L 4031 4581 +L 4847 4581 +L 4847 0 +L 4263 0 +L 4263 3834 +L 2931 0 +L 2384 0 +L 1059 3900 +L 1059 0 +L 475 0 +z +" transform="scale(0.015625)"/> + </defs> + <use xlink:href="#ArialMT-4d"/> + <use xlink:href="#ArialMT-6f" transform="translate(83.300781 0)"/> + <use xlink:href="#ArialMT-64" transform="translate(138.916016 0)"/> + <use xlink:href="#ArialMT-65" transform="translate(194.53125 0)"/> + <use xlink:href="#ArialMT-6c" transform="translate(250.146484 0)"/> + </g> + </g> + </g> + <g id="matplotlib.axis_2"> + <g id="ytick_1"> + <g id="line2d_1"> + <path d="M 90 369.36 +L 648 369.36 +" clip-path="url(#p4d718ef8b1)" style="fill: none; stroke: #cccccc; stroke-linecap: round"/> + </g> + <g id="text_6"> + <!-- 0.1 --> + <g style="fill: #262626" transform="translate(65.21 373.296797) scale(0.11 -0.11)"> + <defs> + <path id="ArialMT-30" d="M 266 2259 +Q 266 3072 433 3567 +Q 600 4063 929 4331 +Q 1259 4600 1759 4600 +Q 2128 4600 2406 4451 +Q 2684 4303 2865 4023 +Q 3047 3744 3150 3342 +Q 3253 2941 3253 2259 +Q 3253 1453 3087 958 +Q 2922 463 2592 192 +Q 2263 -78 1759 -78 +Q 1097 -78 719 397 +Q 266 969 266 2259 +z +M 844 2259 +Q 844 1131 1108 757 +Q 1372 384 1759 384 +Q 2147 384 2411 759 +Q 2675 1134 2675 2259 +Q 2675 3391 2411 3762 +Q 2147 4134 1753 4134 +Q 1366 4134 1134 3806 +Q 844 3388 844 2259 +z +" transform="scale(0.015625)"/> + <path id="ArialMT-2e" d="M 581 0 +L 581 641 +L 1222 641 +L 1222 0 +L 581 0 +z +" transform="scale(0.015625)"/> + </defs> + <use xlink:href="#ArialMT-30"/> + <use xlink:href="#ArialMT-2e" transform="translate(55.615234 0)"/> + <use xlink:href="#ArialMT-31" transform="translate(83.398438 0)"/> + </g> + </g> + </g> + <g id="ytick_2"> + <g id="line2d_2"> + <path d="M 90 315.666818 +L 648 315.666818 +" clip-path="url(#p4d718ef8b1)" style="fill: none; stroke: #cccccc; stroke-linecap: round"/> + </g> + <g id="text_7"> + <!-- 0.2 --> + <g style="fill: #262626" transform="translate(65.21 319.603615) scale(0.11 -0.11)"> + <defs> + <path id="ArialMT-32" d="M 3222 541 +L 3222 0 +L 194 0 +Q 188 203 259 391 +Q 375 700 629 1000 +Q 884 1300 1366 1694 +Q 2113 2306 2375 2664 +Q 2638 3022 2638 3341 +Q 2638 3675 2398 3904 +Q 2159 4134 1775 4134 +Q 1369 4134 1125 3890 +Q 881 3647 878 3216 +L 300 3275 +Q 359 3922 746 4261 +Q 1134 4600 1788 4600 +Q 2447 4600 2831 4234 +Q 3216 3869 3216 3328 +Q 3216 3053 3103 2787 +Q 2991 2522 2730 2228 +Q 2469 1934 1863 1422 +Q 1356 997 1212 845 +Q 1069 694 975 541 +L 3222 541 +z +" transform="scale(0.015625)"/> + </defs> + <use xlink:href="#ArialMT-30"/> + <use xlink:href="#ArialMT-2e" transform="translate(55.615234 0)"/> + <use xlink:href="#ArialMT-32" transform="translate(83.398438 0)"/> + </g> + </g> + </g> + <g id="ytick_3"> + <g id="line2d_3"> + <path d="M 90 261.973636 +L 648 261.973636 +" clip-path="url(#p4d718ef8b1)" style="fill: none; stroke: #cccccc; stroke-linecap: round"/> + </g> + <g id="text_8"> + <!-- 0.3 --> + <g style="fill: #262626" transform="translate(65.21 265.910433) scale(0.11 -0.11)"> + <use xlink:href="#ArialMT-30"/> + <use xlink:href="#ArialMT-2e" transform="translate(55.615234 0)"/> + <use xlink:href="#ArialMT-33" transform="translate(83.398438 0)"/> + </g> + </g> + </g> + <g id="ytick_4"> + <g id="line2d_4"> + <path d="M 90 208.280455 +L 648 208.280455 +" clip-path="url(#p4d718ef8b1)" style="fill: none; stroke: #cccccc; stroke-linecap: round"/> + </g> + <g id="text_9"> + <!-- 0.4 --> + <g style="fill: #262626" transform="translate(65.21 212.217251) scale(0.11 -0.11)"> + <defs> + <path id="ArialMT-34" d="M 2069 0 +L 2069 1097 +L 81 1097 +L 81 1613 +L 2172 4581 +L 2631 4581 +L 2631 1613 +L 3250 1613 +L 3250 1097 +L 2631 1097 +L 2631 0 +L 2069 0 +z +M 2069 1613 +L 2069 3678 +L 634 1613 +L 2069 1613 +z +" transform="scale(0.015625)"/> + </defs> + <use xlink:href="#ArialMT-30"/> + <use xlink:href="#ArialMT-2e" transform="translate(55.615234 0)"/> + <use xlink:href="#ArialMT-34" transform="translate(83.398438 0)"/> + </g> + </g> + </g> + <g id="ytick_5"> + <g id="line2d_5"> + <path d="M 90 154.587273 +L 648 154.587273 +" clip-path="url(#p4d718ef8b1)" style="fill: none; stroke: #cccccc; stroke-linecap: round"/> + </g> + <g id="text_10"> + <!-- 0.5 --> + <g style="fill: #262626" transform="translate(65.21 158.52407) scale(0.11 -0.11)"> + <defs> + <path id="ArialMT-35" d="M 266 1200 +L 856 1250 +Q 922 819 1161 601 +Q 1400 384 1738 384 +Q 2144 384 2425 690 +Q 2706 997 2706 1503 +Q 2706 1984 2436 2262 +Q 2166 2541 1728 2541 +Q 1456 2541 1237 2417 +Q 1019 2294 894 2097 +L 366 2166 +L 809 4519 +L 3088 4519 +L 3088 3981 +L 1259 3981 +L 1013 2750 +Q 1425 3038 1878 3038 +Q 2478 3038 2890 2622 +Q 3303 2206 3303 1553 +Q 3303 931 2941 478 +Q 2500 -78 1738 -78 +Q 1113 -78 717 272 +Q 322 622 266 1200 +z +" transform="scale(0.015625)"/> + </defs> + <use xlink:href="#ArialMT-30"/> + <use xlink:href="#ArialMT-2e" transform="translate(55.615234 0)"/> + <use xlink:href="#ArialMT-35" transform="translate(83.398438 0)"/> + </g> + </g> + </g> + <g id="ytick_6"> + <g id="line2d_6"> + <path d="M 90 100.894091 +L 648 100.894091 +" clip-path="url(#p4d718ef8b1)" style="fill: none; stroke: #cccccc; stroke-linecap: round"/> + </g> + <g id="text_11"> + <!-- 0.6 --> + <g style="fill: #262626" transform="translate(65.21 104.830888) scale(0.11 -0.11)"> + <defs> + <path id="ArialMT-36" d="M 3184 3459 +L 2625 3416 +Q 2550 3747 2413 3897 +Q 2184 4138 1850 4138 +Q 1581 4138 1378 3988 +Q 1113 3794 959 3422 +Q 806 3050 800 2363 +Q 1003 2672 1297 2822 +Q 1591 2972 1913 2972 +Q 2475 2972 2870 2558 +Q 3266 2144 3266 1488 +Q 3266 1056 3080 686 +Q 2894 316 2569 119 +Q 2244 -78 1831 -78 +Q 1128 -78 684 439 +Q 241 956 241 2144 +Q 241 3472 731 4075 +Q 1159 4600 1884 4600 +Q 2425 4600 2770 4297 +Q 3116 3994 3184 3459 +z +M 888 1484 +Q 888 1194 1011 928 +Q 1134 663 1356 523 +Q 1578 384 1822 384 +Q 2178 384 2434 671 +Q 2691 959 2691 1453 +Q 2691 1928 2437 2201 +Q 2184 2475 1800 2475 +Q 1419 2475 1153 2201 +Q 888 1928 888 1484 +z +" transform="scale(0.015625)"/> + </defs> + <use xlink:href="#ArialMT-30"/> + <use xlink:href="#ArialMT-2e" transform="translate(55.615234 0)"/> + <use xlink:href="#ArialMT-36" transform="translate(83.398438 0)"/> + </g> + </g> + </g> + <g id="text_12"> + <!-- CCEI Value --> + <g style="fill: #262626" transform="translate(58.825 249.064687) rotate(-90) scale(0.12 -0.12)"> + <defs> + <path id="ArialMT-43" d="M 3763 1606 +L 4369 1453 +Q 4178 706 3683 314 +Q 3188 -78 2472 -78 +Q 1731 -78 1267 223 +Q 803 525 561 1097 +Q 319 1669 319 2325 +Q 319 3041 592 3573 +Q 866 4106 1370 4382 +Q 1875 4659 2481 4659 +Q 3169 4659 3637 4309 +Q 4106 3959 4291 3325 +L 3694 3184 +Q 3534 3684 3231 3912 +Q 2928 4141 2469 4141 +Q 1941 4141 1586 3887 +Q 1231 3634 1087 3207 +Q 944 2781 944 2328 +Q 944 1744 1114 1308 +Q 1284 872 1643 656 +Q 2003 441 2422 441 +Q 2931 441 3284 734 +Q 3638 1028 3763 1606 +z +" transform="scale(0.015625)"/> + <path id="ArialMT-45" d="M 506 0 +L 506 4581 +L 3819 4581 +L 3819 4041 +L 1113 4041 +L 1113 2638 +L 3647 2638 +L 3647 2100 +L 1113 2100 +L 1113 541 +L 3925 541 +L 3925 0 +L 506 0 +z +" transform="scale(0.015625)"/> + <path id="ArialMT-49" d="M 597 0 +L 597 4581 +L 1203 4581 +L 1203 0 +L 597 0 +z +" transform="scale(0.015625)"/> + <path id="ArialMT-20" transform="scale(0.015625)"/> + <path id="ArialMT-56" d="M 1803 0 +L 28 4581 +L 684 4581 +L 1875 1253 +Q 2019 853 2116 503 +Q 2222 878 2363 1253 +L 3600 4581 +L 4219 4581 +L 2425 0 +L 1803 0 +z +" transform="scale(0.015625)"/> + <path id="ArialMT-75" d="M 2597 0 +L 2597 488 +Q 2209 -75 1544 -75 +Q 1250 -75 995 37 +Q 741 150 617 320 +Q 494 491 444 738 +Q 409 903 409 1263 +L 409 3319 +L 972 3319 +L 972 1478 +Q 972 1038 1006 884 +Q 1059 663 1231 536 +Q 1403 409 1656 409 +Q 1909 409 2131 539 +Q 2353 669 2445 892 +Q 2538 1116 2538 1541 +L 2538 3319 +L 3100 3319 +L 3100 0 +L 2597 0 +z +" transform="scale(0.015625)"/> + </defs> + <use xlink:href="#ArialMT-43"/> + <use xlink:href="#ArialMT-43" transform="translate(72.216797 0)"/> + <use xlink:href="#ArialMT-45" transform="translate(144.433594 0)"/> + <use xlink:href="#ArialMT-49" transform="translate(211.132812 0)"/> + <use xlink:href="#ArialMT-20" transform="translate(238.916016 0)"/> + <use xlink:href="#ArialMT-56" transform="translate(266.699219 0)"/> + <use xlink:href="#ArialMT-61" transform="translate(326.023438 0)"/> + <use xlink:href="#ArialMT-6c" transform="translate(381.638672 0)"/> + <use xlink:href="#ArialMT-75" transform="translate(403.855469 0)"/> + <use xlink:href="#ArialMT-65" transform="translate(459.470703 0)"/> + </g> + </g> + </g> + <g id="patch_3"> + <path d="M 117.9 330.888835 +L 201.6 330.888835 +L 201.6 270.765895 +L 117.9 270.765895 +L 117.9 330.888835 +z +" clip-path="url(#p4d718ef8b1)" style="fill: #333333; stroke: #1f1f1f; stroke-linejoin: miter"/> + </g> + <g id="line2d_7"> + <path d="M 159.75 330.888835 +L 159.75 366.299489 +" clip-path="url(#p4d718ef8b1)" style="fill: none; stroke: #1f1f1f"/> + </g> + <g id="line2d_8"> + <path d="M 159.75 270.765895 +L 159.75 188.521364 +" clip-path="url(#p4d718ef8b1)" style="fill: none; stroke: #1f1f1f"/> + </g> + <g id="line2d_9"> + <path d="M 138.825 366.299489 +L 180.675 366.299489 +" clip-path="url(#p4d718ef8b1)" style="fill: none; stroke: #1f1f1f; stroke-linecap: round"/> + </g> + <g id="line2d_10"> + <path d="M 138.825 188.521364 +L 180.675 188.521364 +" clip-path="url(#p4d718ef8b1)" style="fill: none; stroke: #1f1f1f; stroke-linecap: round"/> + </g> + <g id="line2d_11"/> + <g id="patch_4"> + <path d="M 257.4 303.679815 +L 341.1 303.679815 +L 341.1 227.824773 +L 257.4 227.824773 +L 257.4 303.679815 +z +" clip-path="url(#p4d718ef8b1)" style="fill: #409884; stroke: #1f1f1f; stroke-linejoin: miter"/> + </g> + <g id="line2d_12"> + <path d="M 299.25 303.679815 +L 299.25 349.493523 +" clip-path="url(#p4d718ef8b1)" style="fill: none; stroke: #1f1f1f"/> + </g> + <g id="line2d_13"> + <path d="M 299.25 227.824773 +L 299.25 130.156875 +" clip-path="url(#p4d718ef8b1)" style="fill: none; stroke: #1f1f1f"/> + </g> + <g id="line2d_14"> + <path d="M 278.325 349.493523 +L 320.175 349.493523 +" clip-path="url(#p4d718ef8b1)" style="fill: none; stroke: #1f1f1f; stroke-linecap: round"/> + </g> + <g id="line2d_15"> + <path d="M 278.325 130.156875 +L 320.175 130.156875 +" clip-path="url(#p4d718ef8b1)" style="fill: none; stroke: #1f1f1f; stroke-linecap: round"/> + </g> + <g id="line2d_16"> + <defs> + <path id="mf4da1d586f" d="M 0 3 +C 0.795609 3 1.55874 2.683901 2.12132 2.12132 +C 2.683901 1.55874 3 0.795609 3 0 +C 3 -0.795609 2.683901 -1.55874 2.12132 -2.12132 +C 1.55874 -2.683901 0.795609 -3 0 -3 +C -0.795609 -3 -1.55874 -2.683901 -2.12132 -2.12132 +C -2.683901 -1.55874 -3 -0.795609 -3 0 +C -3 0.795609 -2.683901 1.55874 -2.12132 2.12132 +C -1.55874 2.683901 -0.795609 3 0 3 +z +" style="stroke: #1f1f1f"/> + </defs> + <g clip-path="url(#p4d718ef8b1)"> + <use xlink:href="#mf4da1d586f" x="299.25" y="66.96" style="fill-opacity: 0; stroke: #1f1f1f"/> + </g> + </g> + <g id="patch_5"> + <path d="M 396.9 307.075909 +L 480.6 307.075909 +L 480.6 248.228182 +L 396.9 248.228182 +L 396.9 307.075909 +z +" clip-path="url(#p4d718ef8b1)" style="fill: #e77759; stroke: #1f1f1f; stroke-linejoin: miter"/> + </g> + <g id="line2d_17"> + <path d="M 438.75 307.075909 +L 438.75 335.640682 +" clip-path="url(#p4d718ef8b1)" style="fill: none; stroke: #1f1f1f"/> + </g> + <g id="line2d_18"> + <path d="M 438.75 248.228182 +L 438.75 189.595227 +" clip-path="url(#p4d718ef8b1)" style="fill: none; stroke: #1f1f1f"/> + </g> + <g id="line2d_19"> + <path d="M 417.825 335.640682 +L 459.675 335.640682 +" clip-path="url(#p4d718ef8b1)" style="fill: none; stroke: #1f1f1f; stroke-linecap: round"/> + </g> + <g id="line2d_20"> + <path d="M 417.825 189.595227 +L 459.675 189.595227 +" clip-path="url(#p4d718ef8b1)" style="fill: none; stroke: #1f1f1f; stroke-linecap: round"/> + </g> + <g id="line2d_21"/> + <g id="patch_6"> + <path d="M 536.4 345.627614 +L 620.1 345.627614 +L 620.1 270.698778 +L 536.4 270.698778 +L 536.4 345.627614 +z +" clip-path="url(#p4d718ef8b1)" style="fill: #6b72da; stroke: #1f1f1f; stroke-linejoin: miter"/> + </g> + <g id="line2d_22"> + <path d="M 578.25 345.627614 +L 578.25 369.36 +" clip-path="url(#p4d718ef8b1)" style="fill: none; stroke: #1f1f1f"/> + </g> + <g id="line2d_23"> + <path d="M 578.25 270.698778 +L 578.25 212.951761 +" clip-path="url(#p4d718ef8b1)" style="fill: none; stroke: #1f1f1f"/> + </g> + <g id="line2d_24"> + <path d="M 557.325 369.36 +L 599.175 369.36 +" clip-path="url(#p4d718ef8b1)" style="fill: none; stroke: #1f1f1f; stroke-linecap: round"/> + </g> + <g id="line2d_25"> + <path d="M 557.325 212.951761 +L 599.175 212.951761 +" clip-path="url(#p4d718ef8b1)" style="fill: none; stroke: #1f1f1f; stroke-linecap: round"/> + </g> + <g id="line2d_26"> + <g clip-path="url(#p4d718ef8b1)"> + <use xlink:href="#mf4da1d586f" x="578.25" y="79.416818" style="fill-opacity: 0; stroke: #1f1f1f"/> + </g> + </g> + <g id="line2d_27"> + <path d="M 117.9 293.625767 +L 201.6 293.625767 +" clip-path="url(#p4d718ef8b1)" style="fill: none; stroke: #1f1f1f"/> + </g> + <g id="line2d_28"> + <path d="M 257.4 241.650767 +L 341.1 241.650767 +" clip-path="url(#p4d718ef8b1)" style="fill: none; stroke: #1f1f1f"/> + </g> + <g id="line2d_29"> + <path d="M 396.9 274.86 +L 480.6 274.86 +" clip-path="url(#p4d718ef8b1)" style="fill: none; stroke: #1f1f1f"/> + </g> + <g id="line2d_30"> + <path d="M 536.4 324.794659 +L 620.1 324.794659 +" clip-path="url(#p4d718ef8b1)" style="fill: none; stroke: #1f1f1f"/> + </g> + <g id="patch_7"> + <path d="M 90 384.48 +L 90 51.84 +" style="fill: none; stroke: #cccccc; stroke-width: 1.25; stroke-linejoin: miter; stroke-linecap: square"/> + </g> + <g id="patch_8"> + <path d="M 648 384.48 +L 648 51.84 +" style="fill: none; stroke: #cccccc; stroke-width: 1.25; stroke-linejoin: miter; stroke-linecap: square"/> + </g> + <g id="patch_9"> + <path d="M 90 384.48 +L 648 384.48 +" style="fill: none; stroke: #cccccc; stroke-width: 1.25; stroke-linejoin: miter; stroke-linecap: square"/> + </g> + <g id="patch_10"> + <path d="M 90 51.84 +L 648 51.84 +" style="fill: none; stroke: #cccccc; stroke-width: 1.25; stroke-linejoin: miter; stroke-linecap: square"/> + </g> + <g id="text_13"> + <!-- CCEI Distribution by Model --> + <g style="fill: #262626" transform="translate(284.972656 45.84) scale(0.14 -0.14)"> + <defs> + <path id="ArialMT-44" d="M 494 0 +L 494 4581 +L 2072 4581 +Q 2606 4581 2888 4516 +Q 3281 4425 3559 4188 +Q 3922 3881 4101 3404 +Q 4281 2928 4281 2316 +Q 4281 1794 4159 1391 +Q 4038 988 3847 723 +Q 3656 459 3429 307 +Q 3203 156 2883 78 +Q 2563 0 2147 0 +L 494 0 +z +M 1100 541 +L 2078 541 +Q 2531 541 2789 625 +Q 3047 709 3200 863 +Q 3416 1078 3536 1442 +Q 3656 1806 3656 2325 +Q 3656 3044 3420 3430 +Q 3184 3816 2847 3947 +Q 2603 4041 2063 4041 +L 1100 4041 +L 1100 541 +z +" transform="scale(0.015625)"/> + <path id="ArialMT-62" d="M 941 0 +L 419 0 +L 419 4581 +L 981 4581 +L 981 2947 +Q 1338 3394 1891 3394 +Q 2197 3394 2470 3270 +Q 2744 3147 2920 2923 +Q 3097 2700 3197 2384 +Q 3297 2069 3297 1709 +Q 3297 856 2875 390 +Q 2453 -75 1863 -75 +Q 1275 -75 941 416 +L 941 0 +z +M 934 1684 +Q 934 1088 1097 822 +Q 1363 388 1816 388 +Q 2184 388 2453 708 +Q 2722 1028 2722 1663 +Q 2722 2313 2464 2622 +Q 2206 2931 1841 2931 +Q 1472 2931 1203 2611 +Q 934 2291 934 1684 +z +" transform="scale(0.015625)"/> + <path id="ArialMT-79" d="M 397 -1278 +L 334 -750 +Q 519 -800 656 -800 +Q 844 -800 956 -737 +Q 1069 -675 1141 -563 +Q 1194 -478 1313 -144 +Q 1328 -97 1363 -6 +L 103 3319 +L 709 3319 +L 1400 1397 +Q 1534 1031 1641 628 +Q 1738 1016 1872 1384 +L 2581 3319 +L 3144 3319 +L 1881 -56 +Q 1678 -603 1566 -809 +Q 1416 -1088 1222 -1217 +Q 1028 -1347 759 -1347 +Q 597 -1347 397 -1278 +z +" transform="scale(0.015625)"/> + </defs> + <use xlink:href="#ArialMT-43"/> + <use xlink:href="#ArialMT-43" transform="translate(72.216797 0)"/> + <use xlink:href="#ArialMT-45" transform="translate(144.433594 0)"/> + <use xlink:href="#ArialMT-49" transform="translate(211.132812 0)"/> + <use xlink:href="#ArialMT-20" transform="translate(238.916016 0)"/> + <use xlink:href="#ArialMT-44" transform="translate(266.699219 0)"/> + <use xlink:href="#ArialMT-69" transform="translate(338.916016 0)"/> + <use xlink:href="#ArialMT-73" transform="translate(361.132812 0)"/> + <use xlink:href="#ArialMT-74" transform="translate(411.132812 0)"/> + <use xlink:href="#ArialMT-72" transform="translate(438.916016 0)"/> + <use xlink:href="#ArialMT-69" transform="translate(472.216797 0)"/> + <use xlink:href="#ArialMT-62" transform="translate(494.433594 0)"/> + <use xlink:href="#ArialMT-75" transform="translate(550.048828 0)"/> + <use xlink:href="#ArialMT-74" transform="translate(605.664062 0)"/> + <use xlink:href="#ArialMT-69" transform="translate(633.447266 0)"/> + <use xlink:href="#ArialMT-6f" transform="translate(655.664062 0)"/> + <use xlink:href="#ArialMT-6e" transform="translate(711.279297 0)"/> + <use xlink:href="#ArialMT-20" transform="translate(766.894531 0)"/> + <use xlink:href="#ArialMT-62" transform="translate(794.677734 0)"/> + <use xlink:href="#ArialMT-79" transform="translate(850.292969 0)"/> + <use xlink:href="#ArialMT-20" transform="translate(900.292969 0)"/> + <use xlink:href="#ArialMT-4d" transform="translate(928.076172 0)"/> + <use xlink:href="#ArialMT-6f" transform="translate(1011.376953 0)"/> + <use xlink:href="#ArialMT-64" transform="translate(1066.992188 0)"/> + <use xlink:href="#ArialMT-65" transform="translate(1122.607422 0)"/> + <use xlink:href="#ArialMT-6c" transform="translate(1178.222656 0)"/> + </g> + </g> + </g> + </g> + <defs> + <clipPath id="p4d718ef8b1"> + <rect x="90" y="51.84" width="558" height="332.64"/> + </clipPath> + </defs> +</svg> diff --git a/src/dictator/dictator_consistency.py b/src/dictator/dictator_consistency.py index 59ada6b..04282d2 100644 --- a/src/dictator/dictator_consistency.py +++ b/src/dictator/dictator_consistency.py @@ -1,6 +1,9 @@ import os import asyncio from typing import Dict, List + +from gpytorch.settings import debug +from ollama import generate from pydantic import BaseModel from autogen_agentchat.agents import AssistantAgent from autogen_agentchat.messages import TextMessage @@ -9,7 +12,7 @@ from autogen_ext.models.openai import OpenAIChatCompletionClient import json import random import numpy as np -from scipy.optimize import minimize +from scipy.optimize import linprog # Load API key from environment variable OPENAI_API_KEY = os.getenv("OPENAI_API_KEY") @@ -18,19 +21,20 @@ if not OPENAI_API_KEY: # Define the expected response format as a Pydantic model class AgentResponse(BaseModel): - my_share: float - other_share: float + my_share: int + other_share: int reasoning: str # The dictator game simulation class class DictatorConsistency: - def __init__(self, model: str, temperature: float, random=False, max_retries: int = 3): + def __init__(self, model: str, temperature: float, max_retries: int = 3): + self.debug = False self.model = model self.temperature = temperature self.strategy = random self.max_retries = max_retries # Maximum retry attempts in case of hallucinations - if not random: + if not model == "random": is_openai_model = model.startswith("gpt") base_url = "https://api.openai.com/v1" if is_openai_model else "http://localhost:11434/v1" @@ -53,25 +57,14 @@ class DictatorConsistency: async def run(self, m: float, n: float) -> Dict: """Runs the model if strategy is False, otherwise uses a classical method.""" - if self.strategy: + if self.model == "random": return self.apply_random(m, n) instruction = f""" - You have $100 to allocate between yourself and an anonymous person. - - Allocating 1 point for yourself is worth {m} dollars. - - Allocating 1 point for the other person is worth {n} dollars. - Your goal is to decide how to allocate these $100. - - Example: - - If `m = 1` and `n = 2`, then for every point you allocate to yourself, you receive $1, and for every point you allocate to the other person, they receive $2. - - If you choose to allocate 30 points to yourself, then you would receive 30 * 1 = $30, and the other person would receive $100 - $30 = $70 . - - Thus, your total allocation would be 30 points for yourself and 70/2 = 35 points for the other person, totaling $100. - - - Please provide: - - How many points you want to allocate to yourself (out of $100), - - How many points you want to allocate to the other person. - + You have 100 points to allocate between yourself and an anonymous person. + In this round, allocating every 1 point for yourself returns {m} dollars for yourself, + and allocating every 1 point for the other one returns {n} dollars for him/her. + What is your allocation? Your response should be in JSON format with `my_share`, `other_share`, and `reasoning`. """ @@ -91,82 +84,97 @@ class DictatorConsistency: response_data = response.chat_message.content agent_response = AgentResponse.model_validate_json(response_data) # Parse JSON my_share, other_share = agent_response.my_share, agent_response.other_share - print(f"Response (Attempt {attempt+1}): {response_data}") + if self.debug: + print(f"Response (Attempt {attempt+1}): {response_data}") # Validate values: ensure they sum to $100 considering the values M and N - if 0 <= my_share and 0 <= other_share : - total_value = my_share * m + other_share * n - if abs(total_value - 100.0) < 1e-6: # Use a tolerance for floating-point comparison - return agent_response.model_dump() - else: - print(f"Invalid response detected (Attempt {attempt+1}): Total value {total_value} != 100.") + if 0 <= my_share and my_share <= 100 and 0 <= other_share and other_share <= 100 and my_share + other_share == 100: + return agent_response.model_dump() else: - print(f"Invalid response detected (Attempt {attempt+1}): {response_data}") + if self.debug : + print(f"Invalid response detected (Attempt {attempt+1}): {response_data}") except Exception as e: print(f"Error parsing response (Attempt {attempt+1}): {e}") - raise ValueError("Model failed to provide a valid response after multiple attempts.") def apply_random(self, m:int, n:int) -> Dict: """Generates a response.""" - my_share = (random.uniform(0, 10)) - other_share = (100 - my_share * m) / n - # Validate values: ensure they sum to $100 considering the values M and N - if 0 <= my_share and 0 <= other_share: - total_value = my_share * m + other_share * n - if abs(total_value - 100.0) < 1e-6: # Use a tolerance for floating-point comparison - return { - "my_share": my_share, - "other_share": other_share, - "reasoning": "Random choice" - } - else: - return { - "my_share": my_share, - "other_share": other_share, - "reasoning": "choices outside budget" - - } + my_share = random.randint(0, 100) + other_share = 100 - my_share + return { + "my_share": my_share, + "other_share": other_share, + "reasoning": "Random choice" + } + + + def generate_M_N(self): + while True: + M = random.uniform(0.1, 1) # Random value in [0.1, 1] + N = random.uniform(0.1, 1) # Random value in [0.1, 1] + if max(M, N) >= 0.5: # Ensure max(M, N) is at least 0.5 + return round(M, 1), round(N, 1) + async def run_rounds(self, nb_rounds: int) -> List[Dict]: """Runs the dictator game for n rounds and returns the results.""" results = [] prices = [] choices = [] + budgets = [] for _ in range(nb_rounds): - m = round(random.uniform(0.1, 1.0), 1) # Random price for self - n = round(random.uniform(0.1, 1.0), 1) # Random price for other - print(f"m, n: {m}, {n}") + m, n = self.generate_M_N() + if self.debug: + print(f"m, n: {m}, {n}") result = await self.run(m, n) - print(f"result: {result}") + if self.debug: + print(f"result: {result}") results.append(result) prices.append([m, n]) + budgets.append(m * result['my_share'] + n * result['other_share']) choices.append([result['my_share'], result['other_share']]) + ccei_value = self.compute_ccei(prices, choices,budgets) + if self.debug: + print(f"prices: {prices}") + print(f"choices: {choices}") + print(f"budgets: {budgets}") + print(f"CCEI: {ccei_value}") + return ccei_value + + + def compute_ccei(self, prices, choices, budgets): + """ + Computes the Critical Cost Efficiency Index (CCEI). + :param prices: List of price vectors (list of lists) + :param choices: List of chosen consumption bundles (list of lists) + :param budgets: List of budget values (list) + :return: CCEI value (between 0 and 1) + """ + n = len(prices) # Number of observations + # Objective: maximize lambda (equivalent to minimizing -lambda) + c = [-1] # We minimize -lambda to maximize lambda + A_ub = [] # Constraint matrix + b_ub = [] # Right-hand side values + for t in range(n): + for s in range(n): + lhs = np.dot(prices[t], choices[s]) # p_t * x_s + rhs = budgets[t] # I_t + # Corrected constraint: p_t * x_s - lambda * I_t <= 0 + A_ub.append([rhs]) # Correctly include I_t as coefficient of lambda + b_ub.append(lhs) # p_t * x_s moved to RHS + # Bounds for lambda: between 0 and 1 + bounds = [(0, 1)] + # Solve the linear program + result = linprog(c, A_ub=A_ub, b_ub=b_ub, bounds=bounds, method="highs") + if result.success: + return round(-result.fun, 4) # Extract the optimized lambda + else: + if self.debug: + print("CCEI computation failed. Check constraints.") + return 0 # Return 0 instead of None to indicate irrationality - ccei_value = self.compute_ccei(prices, choices) - print(f"prices: {prices}") - print(f"choices: {choices}") - print(f"CCEI: {ccei_value}") - return results - - def compute_ccei(self, prices: List[List[float]], choices: List[List[float]]) -> float: - """Computes the Critical Cost Efficiency Index (CCEI).""" - def objective(lambda_val): - return lambda_val[0] - - constraints = [] - for t, (p_t, x_t) in enumerate(zip(prices, choices)): - for s, x_s in enumerate(choices): - if t != s: - constraints.append({ - 'type': 'ineq', - 'fun': lambda lambda_val, p_t=p_t, x_s=x_s, x_t=x_t: lambda_val[0] * np.dot(p_t, x_t) - np.dot(p_t, x_s) - }) - - result = minimize(objective, [1], constraints=constraints, bounds=[(0, 1)]) - return result.x[0] if result.success else 0 # Run the async function and return the response if __name__ == "__main__": - game_agent = DictatorConsistency(model="mistral-small", temperature=0.7, random=True) # Toggle strategy here - responses = asyncio.run(game_agent.run_rounds(10)) - print(json.dumps(responses, indent=2)) + game_agent = DictatorConsistency(model="mistral-small", temperature=0.7) # Toggle strategy here + response = asyncio.run(game_agent.run_rounds(25)) + print(response) diff --git a/src/dictator/dictator_consistency_experiments.py b/src/dictator/dictator_consistency_experiments.py new file mode 100644 index 0000000..ac425e7 --- /dev/null +++ b/src/dictator/dictator_consistency_experiments.py @@ -0,0 +1,37 @@ +import os +import asyncio +import csv +from typing import List +import random +from dictator_consistency import DictatorConsistency # Assuming this is in a separate file + +# Define models, temperature, and iterations +models = ["random", "llama3", "mistral-small", "deepseek-r1"] # "gpt-4.5-preview-2025-02-27" +temperature = 0.0 +iterations = 30 +output_file = "../../data/dictator/dictator_consistency.csv" + +async def run_experiment(): + # Open CSV file to store results + with open(output_file, mode="w", newline="") as file: + writer = csv.writer(file) + writer.writerow(["iteration", "model", "temperature", "ccei"]) # CSV header + + # Run each model for multiple iterations + for model in models: + print(f"Running experiments for model: {model}") + for iteration in range(1, iterations + 1): + print(f"Iteration {iteration}/{iterations} for {model}") + + # Run DictatorConsistency experiment + game_agent = DictatorConsistency(model=model, temperature=temperature) + ccei_value = await game_agent.run_rounds(25) # Run 25 rounds + + # Write results to CSV + writer.writerow([iteration, model, temperature, ccei_value]) + file.flush() # Ensure data is written immediately + print(f"Saved iteration {iteration} for {model} -> CCEI: {ccei_value}") + +# Run the async function +if __name__ == "__main__": + asyncio.run(run_experiment()) \ No newline at end of file diff --git a/src/dictator/draw_consistency_draw.py b/src/dictator/draw_consistency_draw.py new file mode 100644 index 0000000..849e73d --- /dev/null +++ b/src/dictator/draw_consistency_draw.py @@ -0,0 +1,44 @@ +import pandas as pd +import seaborn as sns +import matplotlib.pyplot as plt + +# Custom color palette +color_palette = { + 'random': '#333333', # + 'gpt-4.5-preview-2025-02-27': '#7abaff', # Blue + 'llama3': '#32a68c', # Green + 'mistral-small': '#ff6941', # Orange + 'deepseek-r1': '#5862ed' # Indigo +} + +# Load CSV file +file_path = "../../data/dictator/dictator_consistency.csv" # Update path +df = pd.read_csv(file_path) + +# Clean column names +df.columns = df.columns.str.strip() + +# Ensure required columns exist +if "ccei" not in df.columns or "model" not in df.columns: + raise ValueError("Missing required columns ('ccei' or 'model') in the dataset!") + +# Set Seaborn style +sns.set(style="whitegrid") + +# Create figure +plt.figure(figsize=(10, 6)) + +# Draw boxplot +sns.boxplot(data=df, x="model", y="ccei", palette=color_palette, width=0.6) + +# Add plot labels +plt.title("CCEI Distribution by Model", fontsize=14) +plt.xlabel("Model", fontsize=12) +plt.ylabel("CCEI Value", fontsize=12) + +# Rotate x-axis labels for better readability +plt.xticks(rotation=20) + +# Save the figure +output_path = "../../figures/dictator/dictator_consistency.svg" +plt.savefig(output_path, format="svg") -- GitLab