File size: 149,213 Bytes
fac464b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 |
diff --git a/env/mettagrid/c_grid.c b/env/mettagrid/c_grid.c
index 7f6966d..16cdeb0 100644
--- a/env/mettagrid/c_grid.c
+++ b/env/mettagrid/c_grid.c
@@ -1,4 +1,4 @@
-/* Generated by Cython 3.0.8 */
+/* Generated by Cython 3.0.10 */
/* BEGIN: Cython Metadata
{
@@ -9,12 +9,15 @@
"NPY_1_7_API_VERSION"
]
],
- "name": "mettagrid.c_grid",
+ "include_dirs": [
+ "/opt/conda/lib/python3.10/site-packages/numpy/core/include"
+ ],
+ "name": "env.mettagrid.c_grid",
"sources": [
"env/mettagrid/c_grid.pyx"
]
},
- "module_name": "mettagrid.c_grid"
+ "module_name": "env.mettagrid.c_grid"
}
END: Cython Metadata */
@@ -42,10 +45,10 @@ END: Cython Metadata */
#else
#define __PYX_EXTRA_ABI_MODULE_NAME ""
#endif
-#define CYTHON_ABI "3_0_8" __PYX_EXTRA_ABI_MODULE_NAME
+#define CYTHON_ABI "3_0_10" __PYX_EXTRA_ABI_MODULE_NAME
#define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI
#define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "."
-#define CYTHON_HEX_VERSION 0x030008F0
+#define CYTHON_HEX_VERSION 0x03000AF0
#define CYTHON_FUTURE_DIVISION 1
#include <stddef.h>
#ifndef offsetof
@@ -137,6 +140,8 @@ END: Cython Metadata */
#ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
#define CYTHON_UPDATE_DESCRIPTOR_DOC 0
#endif
+ #undef CYTHON_USE_FREELISTS
+ #define CYTHON_USE_FREELISTS 0
#elif defined(PYPY_VERSION)
#define CYTHON_COMPILING_IN_PYPY 1
#define CYTHON_COMPILING_IN_CPYTHON 0
@@ -198,6 +203,8 @@ END: Cython Metadata */
#ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
#define CYTHON_UPDATE_DESCRIPTOR_DOC 0
#endif
+ #undef CYTHON_USE_FREELISTS
+ #define CYTHON_USE_FREELISTS 0
#elif defined(CYTHON_LIMITED_API)
#ifdef Py_LIMITED_API
#undef __PYX_LIMITED_VERSION_HEX
@@ -259,6 +266,8 @@ END: Cython Metadata */
#ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
#define CYTHON_UPDATE_DESCRIPTOR_DOC 0
#endif
+ #undef CYTHON_USE_FREELISTS
+ #define CYTHON_USE_FREELISTS 0
#elif defined(Py_GIL_DISABLED) || defined(Py_NOGIL)
#define CYTHON_COMPILING_IN_PYPY 0
#define CYTHON_COMPILING_IN_CPYTHON 0
@@ -268,11 +277,17 @@ END: Cython Metadata */
#ifndef CYTHON_USE_TYPE_SLOTS
#define CYTHON_USE_TYPE_SLOTS 1
#endif
+ #ifndef CYTHON_USE_TYPE_SPECS
+ #define CYTHON_USE_TYPE_SPECS 0
+ #endif
#undef CYTHON_USE_PYTYPE_LOOKUP
#define CYTHON_USE_PYTYPE_LOOKUP 0
#ifndef CYTHON_USE_ASYNC_SLOTS
#define CYTHON_USE_ASYNC_SLOTS 1
#endif
+ #ifndef CYTHON_USE_PYLONG_INTERNALS
+ #define CYTHON_USE_PYLONG_INTERNALS 0
+ #endif
#undef CYTHON_USE_PYLIST_INTERNALS
#define CYTHON_USE_PYLIST_INTERNALS 0
#ifndef CYTHON_USE_UNICODE_INTERNALS
@@ -280,8 +295,6 @@ END: Cython Metadata */
#endif
#undef CYTHON_USE_UNICODE_WRITER
#define CYTHON_USE_UNICODE_WRITER 0
- #undef CYTHON_USE_PYLONG_INTERNALS
- #define CYTHON_USE_PYLONG_INTERNALS 0
#ifndef CYTHON_AVOID_BORROWED_REFS
#define CYTHON_AVOID_BORROWED_REFS 0
#endif
@@ -293,11 +306,22 @@ END: Cython Metadata */
#endif
#undef CYTHON_FAST_THREAD_STATE
#define CYTHON_FAST_THREAD_STATE 0
+ #undef CYTHON_FAST_GIL
+ #define CYTHON_FAST_GIL 0
+ #ifndef CYTHON_METH_FASTCALL
+ #define CYTHON_METH_FASTCALL 1
+ #endif
#undef CYTHON_FAST_PYCALL
#define CYTHON_FAST_PYCALL 0
+ #ifndef CYTHON_PEP487_INIT_SUBCLASS
+ #define CYTHON_PEP487_INIT_SUBCLASS 1
+ #endif
#ifndef CYTHON_PEP489_MULTI_PHASE_INIT
#define CYTHON_PEP489_MULTI_PHASE_INIT 1
#endif
+ #ifndef CYTHON_USE_MODULE_STATE
+ #define CYTHON_USE_MODULE_STATE 0
+ #endif
#ifndef CYTHON_USE_TP_FINALIZE
#define CYTHON_USE_TP_FINALIZE 1
#endif
@@ -305,6 +329,12 @@ END: Cython Metadata */
#define CYTHON_USE_DICT_VERSIONS 0
#undef CYTHON_USE_EXC_INFO_STACK
#define CYTHON_USE_EXC_INFO_STACK 0
+ #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
+ #define CYTHON_UPDATE_DESCRIPTOR_DOC 1
+ #endif
+ #ifndef CYTHON_USE_FREELISTS
+ #define CYTHON_USE_FREELISTS 0
+ #endif
#else
#define CYTHON_COMPILING_IN_PYPY 0
#define CYTHON_COMPILING_IN_CPYTHON 1
@@ -395,6 +425,9 @@ END: Cython Metadata */
#ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
#define CYTHON_UPDATE_DESCRIPTOR_DOC 1
#endif
+ #ifndef CYTHON_USE_FREELISTS
+ #define CYTHON_USE_FREELISTS 1
+ #endif
#endif
#if !defined(CYTHON_FAST_PYCCALL)
#define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
@@ -738,8 +771,13 @@ END: Cython Metadata */
typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
Py_ssize_t nargs, PyObject *kwnames);
#else
- #define __Pyx_PyCFunctionFast _PyCFunctionFast
- #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
+ #if PY_VERSION_HEX >= 0x030d00A4
+ # define __Pyx_PyCFunctionFast PyCFunctionFast
+ # define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords
+ #else
+ # define __Pyx_PyCFunctionFast _PyCFunctionFast
+ # define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
+ #endif
#endif
#if CYTHON_METH_FASTCALL
#define __Pyx_METH_FASTCALL METH_FASTCALL
@@ -1091,7 +1129,7 @@ static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict,
#define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o)
#define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o)
#endif
-#if PY_VERSION_HEX >= 0x030d00A1
+#if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1
#define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name)
#else
static CYTHON_INLINE PyObject *__Pyx_PyImport_AddModuleRef(const char *name) {
@@ -1178,7 +1216,7 @@ static CYTHON_INLINE float __PYX_NAN() {
#endif
#define __PYX_MARK_ERR_POS(f_index, lineno) \
- { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; }
+ { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; }
#define __PYX_ERR(f_index, lineno, Ln_error) \
{ __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }
@@ -1199,8 +1237,8 @@ static CYTHON_INLINE float __PYX_NAN() {
#endif
#endif
-#define __PYX_HAVE__mettagrid__c_grid
-#define __PYX_HAVE_API__mettagrid__c_grid
+#define __PYX_HAVE__env__mettagrid__c_grid
+#define __PYX_HAVE_API__env__mettagrid__c_grid
/* Early includes */
#include "pythread.h"
#include <string.h>
@@ -1284,24 +1322,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
#define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s)
#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
-#if CYTHON_COMPILING_IN_LIMITED_API
-static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const wchar_t *u)
-{
- const wchar_t *u_end = u;
- while (*u_end++) ;
- return (size_t)(u_end - u - 1);
-}
-#else
-static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u)
-{
- const Py_UNICODE *u_end = u;
- while (*u_end++) ;
- return (size_t)(u_end - u - 1);
-}
-#endif
#define __Pyx_PyUnicode_FromOrdinal(o) PyUnicode_FromOrdinal((int)o)
-#define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
-#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
#define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
#define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
@@ -1620,22 +1641,22 @@ typedef struct {
/* #### Code section: type_declarations ### */
/*--- Type declarations ---*/
-struct __pyx_obj_9mettagrid_6c_grid_Environment;
+struct __pyx_obj_3env_9mettagrid_6c_grid_Environment;
struct __pyx_array_obj;
struct __pyx_MemviewEnum_obj;
struct __pyx_memoryview_obj;
struct __pyx_memoryviewslice_obj;
-/* "mettagrid/c_grid.pyx":20
+/* "env/mettagrid/c_grid.pyx":20
* int WEST = 4
*
* cdef class Environment: # <<<<<<<<<<<<<<
* cdef:
* int map_size
*/
-struct __pyx_obj_9mettagrid_6c_grid_Environment {
+struct __pyx_obj_3env_9mettagrid_6c_grid_Environment {
PyObject_HEAD
- struct __pyx_vtabstruct_9mettagrid_6c_grid_Environment *__pyx_vtab;
+ struct __pyx_vtabstruct_3env_9mettagrid_6c_grid_Environment *__pyx_vtab;
int map_size;
int num_agents;
int horizon;
@@ -1725,7 +1746,7 @@ struct __pyx_memoryviewslice_obj {
-/* "mettagrid/c_grid.pyx":20
+/* "env/mettagrid/c_grid.pyx":20
* int WEST = 4
*
* cdef class Environment: # <<<<<<<<<<<<<<
@@ -1733,10 +1754,10 @@ struct __pyx_memoryviewslice_obj {
* int map_size
*/
-struct __pyx_vtabstruct_9mettagrid_6c_grid_Environment {
- void (*_compute_observations)(struct __pyx_obj_9mettagrid_6c_grid_Environment *);
+struct __pyx_vtabstruct_3env_9mettagrid_6c_grid_Environment {
+ void (*_compute_observations)(struct __pyx_obj_3env_9mettagrid_6c_grid_Environment *);
};
-static struct __pyx_vtabstruct_9mettagrid_6c_grid_Environment *__pyx_vtabptr_9mettagrid_6c_grid_Environment;
+static struct __pyx_vtabstruct_3env_9mettagrid_6c_grid_Environment *__pyx_vtabptr_3env_9mettagrid_6c_grid_Environment;
/* "View.MemoryView":114
@@ -2768,17 +2789,17 @@ static PyObject *__pyx_memoryview__get_base(struct __pyx_memoryview_obj *__pyx_v
static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/
static PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/
static PyObject *__pyx_memoryviewslice__get_base(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto*/
-static void __pyx_f_9mettagrid_6c_grid_11Environment__compute_observations(struct __pyx_obj_9mettagrid_6c_grid_Environment *__pyx_v_self); /* proto*/
-
-/* Module declarations from "mettagrid.c_grid" */
-static int __pyx_v_9mettagrid_6c_grid_EMPTY;
-static int __pyx_v_9mettagrid_6c_grid_AGENT;
-static int __pyx_v_9mettagrid_6c_grid_WALL;
-static int __pyx_v_9mettagrid_6c_grid_PASS;
-static int __pyx_v_9mettagrid_6c_grid_NORTH;
-static int __pyx_v_9mettagrid_6c_grid_SOUTH;
-static int __pyx_v_9mettagrid_6c_grid_EAST;
-static int __pyx_v_9mettagrid_6c_grid_WEST;
+static void __pyx_f_3env_9mettagrid_6c_grid_11Environment__compute_observations(struct __pyx_obj_3env_9mettagrid_6c_grid_Environment *__pyx_v_self); /* proto*/
+
+/* Module declarations from "env.mettagrid.c_grid" */
+static int __pyx_v_3env_9mettagrid_6c_grid_EMPTY;
+static int __pyx_v_3env_9mettagrid_6c_grid_AGENT;
+static int __pyx_v_3env_9mettagrid_6c_grid_WALL;
+static int __pyx_v_3env_9mettagrid_6c_grid_PASS;
+static int __pyx_v_3env_9mettagrid_6c_grid_NORTH;
+static int __pyx_v_3env_9mettagrid_6c_grid_SOUTH;
+static int __pyx_v_3env_9mettagrid_6c_grid_EAST;
+static int __pyx_v_3env_9mettagrid_6c_grid_WEST;
static PyObject *__pyx_collections_abc_Sequence = 0;
static PyObject *generic = 0;
static PyObject *strided = 0;
@@ -2787,7 +2808,7 @@ static PyObject *contiguous = 0;
static PyObject *indirect_contiguous = 0;
static int __pyx_memoryview_thread_locks_used;
static PyThread_type_lock __pyx_memoryview_thread_locks[8];
-static PyObject *__pyx_f_9mettagrid_6c_grid___pyx_unpickle_Environment__set_state(struct __pyx_obj_9mettagrid_6c_grid_Environment *, PyObject *); /*proto*/
+static PyObject *__pyx_f_3env_9mettagrid_6c_grid___pyx_unpickle_Environment__set_state(struct __pyx_obj_3env_9mettagrid_6c_grid_Environment *, PyObject *); /*proto*/
static int __pyx_array_allocate_buffer(struct __pyx_array_obj *); /*proto*/
static struct __pyx_array_obj *__pyx_array_new(PyObject *, Py_ssize_t, char *, char *, char *); /*proto*/
static PyObject *__pyx_memoryview_new(PyObject *, int, int, __Pyx_TypeInfo *); /*proto*/
@@ -2826,11 +2847,11 @@ static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *,
static __Pyx_TypeInfo __Pyx_TypeInfo_unsigned_int = { "unsigned int", NULL, sizeof(unsigned int), { 0 }, 0, __PYX_IS_UNSIGNED(unsigned int) ? 'U' : 'I', __PYX_IS_UNSIGNED(unsigned int), 0 };
static __Pyx_TypeInfo __Pyx_TypeInfo_unsigned_char = { "unsigned char", NULL, sizeof(unsigned char), { 0 }, 0, __PYX_IS_UNSIGNED(unsigned char) ? 'U' : 'I', __PYX_IS_UNSIGNED(unsigned char), 0 };
/* #### Code section: before_global_var ### */
-#define __Pyx_MODULE_NAME "mettagrid.c_grid"
-extern int __pyx_module_is_main_mettagrid__c_grid;
-int __pyx_module_is_main_mettagrid__c_grid = 0;
+#define __Pyx_MODULE_NAME "env.mettagrid.c_grid"
+extern int __pyx_module_is_main_env__mettagrid__c_grid;
+int __pyx_module_is_main_env__mettagrid__c_grid = 0;
-/* Implementation of "mettagrid.c_grid" */
+/* Implementation of "env.mettagrid.c_grid" */
/* #### Code section: global_var ### */
static PyObject *__pyx_builtin_range;
static PyObject *__pyx_builtin_ValueError;
@@ -2954,12 +2975,12 @@ static const char __pyx_k_dtype_is_object[] = "dtype_is_object";
static const char __pyx_k_pyx_PickleError[] = "__pyx_PickleError";
static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
static const char __pyx_k_Environment_step[] = "Environment.step";
-static const char __pyx_k_mettagrid_c_grid[] = "mettagrid.c_grid";
static const char __pyx_k_Environment_reset[] = "Environment.reset";
static const char __pyx_k_pyx_unpickle_Enum[] = "__pyx_unpickle_Enum";
static const char __pyx_k_asyncio_coroutines[] = "asyncio.coroutines";
static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
static const char __pyx_k_strided_and_direct[] = "<strided and direct>";
+static const char __pyx_k_env_mettagrid_c_grid[] = "env.mettagrid.c_grid";
static const char __pyx_k_spawn_position_cands[] = "spawn_position_cands";
static const char __pyx_k_strided_and_indirect[] = "<strided and indirect>";
static const char __pyx_k_Invalid_shape_in_axis[] = "Invalid shape in axis ";
@@ -3036,13 +3057,13 @@ static void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewsl
static PyObject *__pyx_pf___pyx_memoryviewslice___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf___pyx_memoryviewslice_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
-static int __pyx_pf_9mettagrid_6c_grid_11Environment___init__(struct __pyx_obj_9mettagrid_6c_grid_Environment *__pyx_v_self, PyObject *__pyx_v_grid, PyObject *__pyx_v_agent_positions, PyObject *__pyx_v_spawn_position_cands, PyObject *__pyx_v_observations, int __pyx_v_map_size, int __pyx_v_num_agents, int __pyx_v_horizon, int __pyx_v_vision_range); /* proto */
-static PyObject *__pyx_pf_9mettagrid_6c_grid_11Environment_2reset(struct __pyx_obj_9mettagrid_6c_grid_Environment *__pyx_v_self, PyObject *__pyx_v_observations, CYTHON_UNUSED PyObject *__pyx_v_seed); /* proto */
-static PyObject *__pyx_pf_9mettagrid_6c_grid_11Environment_4step(struct __pyx_obj_9mettagrid_6c_grid_Environment *__pyx_v_self, PyObject *__pyx_v_np_actions); /* proto */
-static PyObject *__pyx_pf_9mettagrid_6c_grid_11Environment_6__reduce_cython__(struct __pyx_obj_9mettagrid_6c_grid_Environment *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_9mettagrid_6c_grid_11Environment_8__setstate_cython__(struct __pyx_obj_9mettagrid_6c_grid_Environment *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
-static PyObject *__pyx_pf_9mettagrid_6c_grid___pyx_unpickle_Environment(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
-static PyObject *__pyx_tp_new_9mettagrid_6c_grid_Environment(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static int __pyx_pf_3env_9mettagrid_6c_grid_11Environment___init__(struct __pyx_obj_3env_9mettagrid_6c_grid_Environment *__pyx_v_self, PyObject *__pyx_v_grid, PyObject *__pyx_v_agent_positions, PyObject *__pyx_v_spawn_position_cands, PyObject *__pyx_v_observations, int __pyx_v_map_size, int __pyx_v_num_agents, int __pyx_v_horizon, int __pyx_v_vision_range); /* proto */
+static PyObject *__pyx_pf_3env_9mettagrid_6c_grid_11Environment_2reset(struct __pyx_obj_3env_9mettagrid_6c_grid_Environment *__pyx_v_self, PyObject *__pyx_v_observations, CYTHON_UNUSED PyObject *__pyx_v_seed); /* proto */
+static PyObject *__pyx_pf_3env_9mettagrid_6c_grid_11Environment_4step(struct __pyx_obj_3env_9mettagrid_6c_grid_Environment *__pyx_v_self, PyObject *__pyx_v_np_actions); /* proto */
+static PyObject *__pyx_pf_3env_9mettagrid_6c_grid_11Environment_6__reduce_cython__(struct __pyx_obj_3env_9mettagrid_6c_grid_Environment *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_3env_9mettagrid_6c_grid_11Environment_8__setstate_cython__(struct __pyx_obj_3env_9mettagrid_6c_grid_Environment *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
+static PyObject *__pyx_pf_3env_9mettagrid_6c_grid___pyx_unpickle_Environment(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
+static PyObject *__pyx_tp_new_3env_9mettagrid_6c_grid_Environment(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
@@ -3075,13 +3096,13 @@ typedef struct {
PyTypeObject *__pyx_CoroutineType;
#endif
#if CYTHON_USE_MODULE_STATE
- PyObject *__pyx_type_9mettagrid_6c_grid_Environment;
+ PyObject *__pyx_type_3env_9mettagrid_6c_grid_Environment;
PyObject *__pyx_type___pyx_array;
PyObject *__pyx_type___pyx_MemviewEnum;
PyObject *__pyx_type___pyx_memoryview;
PyObject *__pyx_type___pyx_memoryviewslice;
#endif
- PyTypeObject *__pyx_ptype_9mettagrid_6c_grid_Environment;
+ PyTypeObject *__pyx_ptype_3env_9mettagrid_6c_grid_Environment;
PyTypeObject *__pyx_array_type;
PyTypeObject *__pyx_MemviewEnum_type;
PyTypeObject *__pyx_memoryview_type;
@@ -3159,6 +3180,7 @@ typedef struct {
PyObject *__pyx_kp_u_enable;
PyObject *__pyx_n_s_encode;
PyObject *__pyx_n_s_enumerate;
+ PyObject *__pyx_n_s_env_mettagrid_c_grid;
PyObject *__pyx_kp_s_env_mettagrid_c_grid_pyx;
PyObject *__pyx_n_s_error;
PyObject *__pyx_n_s_flags;
@@ -3183,7 +3205,6 @@ typedef struct {
PyObject *__pyx_n_s_main;
PyObject *__pyx_n_s_map_size;
PyObject *__pyx_n_s_memview;
- PyObject *__pyx_n_s_mettagrid_c_grid;
PyObject *__pyx_n_s_mode;
PyObject *__pyx_n_s_name;
PyObject *__pyx_n_s_name_2;
@@ -3316,8 +3337,8 @@ static int __pyx_m_clear(PyObject *m) {
#ifdef __Pyx_FusedFunction_USED
Py_CLEAR(clear_module_state->__pyx_FusedFunctionType);
#endif
- Py_CLEAR(clear_module_state->__pyx_ptype_9mettagrid_6c_grid_Environment);
- Py_CLEAR(clear_module_state->__pyx_type_9mettagrid_6c_grid_Environment);
+ Py_CLEAR(clear_module_state->__pyx_ptype_3env_9mettagrid_6c_grid_Environment);
+ Py_CLEAR(clear_module_state->__pyx_type_3env_9mettagrid_6c_grid_Environment);
Py_CLEAR(clear_module_state->__pyx_array_type);
Py_CLEAR(clear_module_state->__pyx_type___pyx_array);
Py_CLEAR(clear_module_state->__pyx_MemviewEnum_type);
@@ -3399,6 +3420,7 @@ static int __pyx_m_clear(PyObject *m) {
Py_CLEAR(clear_module_state->__pyx_kp_u_enable);
Py_CLEAR(clear_module_state->__pyx_n_s_encode);
Py_CLEAR(clear_module_state->__pyx_n_s_enumerate);
+ Py_CLEAR(clear_module_state->__pyx_n_s_env_mettagrid_c_grid);
Py_CLEAR(clear_module_state->__pyx_kp_s_env_mettagrid_c_grid_pyx);
Py_CLEAR(clear_module_state->__pyx_n_s_error);
Py_CLEAR(clear_module_state->__pyx_n_s_flags);
@@ -3423,7 +3445,6 @@ static int __pyx_m_clear(PyObject *m) {
Py_CLEAR(clear_module_state->__pyx_n_s_main);
Py_CLEAR(clear_module_state->__pyx_n_s_map_size);
Py_CLEAR(clear_module_state->__pyx_n_s_memview);
- Py_CLEAR(clear_module_state->__pyx_n_s_mettagrid_c_grid);
Py_CLEAR(clear_module_state->__pyx_n_s_mode);
Py_CLEAR(clear_module_state->__pyx_n_s_name);
Py_CLEAR(clear_module_state->__pyx_n_s_name_2);
@@ -3534,8 +3555,8 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
#ifdef __Pyx_FusedFunction_USED
Py_VISIT(traverse_module_state->__pyx_FusedFunctionType);
#endif
- Py_VISIT(traverse_module_state->__pyx_ptype_9mettagrid_6c_grid_Environment);
- Py_VISIT(traverse_module_state->__pyx_type_9mettagrid_6c_grid_Environment);
+ Py_VISIT(traverse_module_state->__pyx_ptype_3env_9mettagrid_6c_grid_Environment);
+ Py_VISIT(traverse_module_state->__pyx_type_3env_9mettagrid_6c_grid_Environment);
Py_VISIT(traverse_module_state->__pyx_array_type);
Py_VISIT(traverse_module_state->__pyx_type___pyx_array);
Py_VISIT(traverse_module_state->__pyx_MemviewEnum_type);
@@ -3617,6 +3638,7 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
Py_VISIT(traverse_module_state->__pyx_kp_u_enable);
Py_VISIT(traverse_module_state->__pyx_n_s_encode);
Py_VISIT(traverse_module_state->__pyx_n_s_enumerate);
+ Py_VISIT(traverse_module_state->__pyx_n_s_env_mettagrid_c_grid);
Py_VISIT(traverse_module_state->__pyx_kp_s_env_mettagrid_c_grid_pyx);
Py_VISIT(traverse_module_state->__pyx_n_s_error);
Py_VISIT(traverse_module_state->__pyx_n_s_flags);
@@ -3641,7 +3663,6 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
Py_VISIT(traverse_module_state->__pyx_n_s_main);
Py_VISIT(traverse_module_state->__pyx_n_s_map_size);
Py_VISIT(traverse_module_state->__pyx_n_s_memview);
- Py_VISIT(traverse_module_state->__pyx_n_s_mettagrid_c_grid);
Py_VISIT(traverse_module_state->__pyx_n_s_mode);
Py_VISIT(traverse_module_state->__pyx_n_s_name);
Py_VISIT(traverse_module_state->__pyx_n_s_name_2);
@@ -3761,13 +3782,13 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
#define __pyx_CoroutineType __pyx_mstate_global->__pyx_CoroutineType
#endif
#if CYTHON_USE_MODULE_STATE
-#define __pyx_type_9mettagrid_6c_grid_Environment __pyx_mstate_global->__pyx_type_9mettagrid_6c_grid_Environment
+#define __pyx_type_3env_9mettagrid_6c_grid_Environment __pyx_mstate_global->__pyx_type_3env_9mettagrid_6c_grid_Environment
#define __pyx_type___pyx_array __pyx_mstate_global->__pyx_type___pyx_array
#define __pyx_type___pyx_MemviewEnum __pyx_mstate_global->__pyx_type___pyx_MemviewEnum
#define __pyx_type___pyx_memoryview __pyx_mstate_global->__pyx_type___pyx_memoryview
#define __pyx_type___pyx_memoryviewslice __pyx_mstate_global->__pyx_type___pyx_memoryviewslice
#endif
-#define __pyx_ptype_9mettagrid_6c_grid_Environment __pyx_mstate_global->__pyx_ptype_9mettagrid_6c_grid_Environment
+#define __pyx_ptype_3env_9mettagrid_6c_grid_Environment __pyx_mstate_global->__pyx_ptype_3env_9mettagrid_6c_grid_Environment
#define __pyx_array_type __pyx_mstate_global->__pyx_array_type
#define __pyx_MemviewEnum_type __pyx_mstate_global->__pyx_MemviewEnum_type
#define __pyx_memoryview_type __pyx_mstate_global->__pyx_memoryview_type
@@ -3845,6 +3866,7 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
#define __pyx_kp_u_enable __pyx_mstate_global->__pyx_kp_u_enable
#define __pyx_n_s_encode __pyx_mstate_global->__pyx_n_s_encode
#define __pyx_n_s_enumerate __pyx_mstate_global->__pyx_n_s_enumerate
+#define __pyx_n_s_env_mettagrid_c_grid __pyx_mstate_global->__pyx_n_s_env_mettagrid_c_grid
#define __pyx_kp_s_env_mettagrid_c_grid_pyx __pyx_mstate_global->__pyx_kp_s_env_mettagrid_c_grid_pyx
#define __pyx_n_s_error __pyx_mstate_global->__pyx_n_s_error
#define __pyx_n_s_flags __pyx_mstate_global->__pyx_n_s_flags
@@ -3869,7 +3891,6 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
#define __pyx_n_s_main __pyx_mstate_global->__pyx_n_s_main
#define __pyx_n_s_map_size __pyx_mstate_global->__pyx_n_s_map_size
#define __pyx_n_s_memview __pyx_mstate_global->__pyx_n_s_memview
-#define __pyx_n_s_mettagrid_c_grid __pyx_mstate_global->__pyx_n_s_mettagrid_c_grid
#define __pyx_n_s_mode __pyx_mstate_global->__pyx_n_s_mode
#define __pyx_n_s_name __pyx_mstate_global->__pyx_n_s_name
#define __pyx_n_s_name_2 __pyx_mstate_global->__pyx_n_s_name_2
@@ -17588,7 +17609,7 @@ static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *__
return __pyx_r;
}
-/* "mettagrid/c_grid.pyx":33
+/* "env/mettagrid/c_grid.pyx":33
* unsigned int[:, :] spawn_position_cands
*
* def __init__(self, grid, agent_positions, spawn_position_cands, observations, # <<<<<<<<<<<<<<
@@ -17597,8 +17618,8 @@ static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *__
*/
/* Python wrapper */
-static int __pyx_pw_9mettagrid_6c_grid_11Environment_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static int __pyx_pw_9mettagrid_6c_grid_11Environment_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static int __pyx_pw_3env_9mettagrid_6c_grid_11Environment_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_3env_9mettagrid_6c_grid_11Environment_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_grid = 0;
PyObject *__pyx_v_agent_positions = 0;
PyObject *__pyx_v_spawn_position_cands = 0;
@@ -17763,11 +17784,11 @@ static int __pyx_pw_9mettagrid_6c_grid_11Environment_1__init__(PyObject *__pyx_v
__Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
}
}
- __Pyx_AddTraceback("mettagrid.c_grid.Environment.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("env.mettagrid.c_grid.Environment.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return -1;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_9mettagrid_6c_grid_11Environment___init__(((struct __pyx_obj_9mettagrid_6c_grid_Environment *)__pyx_v_self), __pyx_v_grid, __pyx_v_agent_positions, __pyx_v_spawn_position_cands, __pyx_v_observations, __pyx_v_map_size, __pyx_v_num_agents, __pyx_v_horizon, __pyx_v_vision_range);
+ __pyx_r = __pyx_pf_3env_9mettagrid_6c_grid_11Environment___init__(((struct __pyx_obj_3env_9mettagrid_6c_grid_Environment *)__pyx_v_self), __pyx_v_grid, __pyx_v_agent_positions, __pyx_v_spawn_position_cands, __pyx_v_observations, __pyx_v_map_size, __pyx_v_num_agents, __pyx_v_horizon, __pyx_v_vision_range);
/* function exit code */
{
@@ -17780,7 +17801,7 @@ static int __pyx_pw_9mettagrid_6c_grid_11Environment_1__init__(PyObject *__pyx_v
return __pyx_r;
}
-static int __pyx_pf_9mettagrid_6c_grid_11Environment___init__(struct __pyx_obj_9mettagrid_6c_grid_Environment *__pyx_v_self, PyObject *__pyx_v_grid, PyObject *__pyx_v_agent_positions, PyObject *__pyx_v_spawn_position_cands, PyObject *__pyx_v_observations, int __pyx_v_map_size, int __pyx_v_num_agents, int __pyx_v_horizon, int __pyx_v_vision_range) {
+static int __pyx_pf_3env_9mettagrid_6c_grid_11Environment___init__(struct __pyx_obj_3env_9mettagrid_6c_grid_Environment *__pyx_v_self, PyObject *__pyx_v_grid, PyObject *__pyx_v_agent_positions, PyObject *__pyx_v_spawn_position_cands, PyObject *__pyx_v_observations, int __pyx_v_map_size, int __pyx_v_num_agents, int __pyx_v_horizon, int __pyx_v_vision_range) {
int __pyx_r;
__Pyx_memviewslice __pyx_t_1 = { 0, 0, { 0 }, { 0 }, { 0 } };
__Pyx_memviewslice __pyx_t_2 = { 0, 0, { 0 }, { 0 }, { 0 } };
@@ -17789,7 +17810,7 @@ static int __pyx_pf_9mettagrid_6c_grid_11Environment___init__(struct __pyx_obj_9
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
- /* "mettagrid/c_grid.pyx":35
+ /* "env/mettagrid/c_grid.pyx":35
* def __init__(self, grid, agent_positions, spawn_position_cands, observations,
* int map_size, int num_agents, int horizon, int vision_range):
* self.map_size = map_size # <<<<<<<<<<<<<<
@@ -17798,7 +17819,7 @@ static int __pyx_pf_9mettagrid_6c_grid_11Environment___init__(struct __pyx_obj_9
*/
__pyx_v_self->map_size = __pyx_v_map_size;
- /* "mettagrid/c_grid.pyx":36
+ /* "env/mettagrid/c_grid.pyx":36
* int map_size, int num_agents, int horizon, int vision_range):
* self.map_size = map_size
* self.num_agents = num_agents # <<<<<<<<<<<<<<
@@ -17807,7 +17828,7 @@ static int __pyx_pf_9mettagrid_6c_grid_11Environment___init__(struct __pyx_obj_9
*/
__pyx_v_self->num_agents = __pyx_v_num_agents;
- /* "mettagrid/c_grid.pyx":37
+ /* "env/mettagrid/c_grid.pyx":37
* self.map_size = map_size
* self.num_agents = num_agents
* self.horizon = horizon # <<<<<<<<<<<<<<
@@ -17816,7 +17837,7 @@ static int __pyx_pf_9mettagrid_6c_grid_11Environment___init__(struct __pyx_obj_9
*/
__pyx_v_self->horizon = __pyx_v_horizon;
- /* "mettagrid/c_grid.pyx":38
+ /* "env/mettagrid/c_grid.pyx":38
* self.num_agents = num_agents
* self.horizon = horizon
* self.vision_range = vision_range # <<<<<<<<<<<<<<
@@ -17825,7 +17846,7 @@ static int __pyx_pf_9mettagrid_6c_grid_11Environment___init__(struct __pyx_obj_9
*/
__pyx_v_self->vision_range = __pyx_v_vision_range;
- /* "mettagrid/c_grid.pyx":39
+ /* "env/mettagrid/c_grid.pyx":39
* self.horizon = horizon
* self.vision_range = vision_range
* self.obs_size = 2*self.vision_range + 1 # <<<<<<<<<<<<<<
@@ -17834,7 +17855,7 @@ static int __pyx_pf_9mettagrid_6c_grid_11Environment___init__(struct __pyx_obj_9
*/
__pyx_v_self->obs_size = ((2 * __pyx_v_self->vision_range) + 1);
- /* "mettagrid/c_grid.pyx":41
+ /* "env/mettagrid/c_grid.pyx":41
* self.obs_size = 2*self.vision_range + 1
*
* self.grid = grid # <<<<<<<<<<<<<<
@@ -17847,7 +17868,7 @@ static int __pyx_pf_9mettagrid_6c_grid_11Environment___init__(struct __pyx_obj_9
__pyx_t_1.memview = NULL;
__pyx_t_1.data = NULL;
- /* "mettagrid/c_grid.pyx":42
+ /* "env/mettagrid/c_grid.pyx":42
*
* self.grid = grid
* self.observations = observations # <<<<<<<<<<<<<<
@@ -17860,7 +17881,7 @@ static int __pyx_pf_9mettagrid_6c_grid_11Environment___init__(struct __pyx_obj_9
__pyx_t_2.memview = NULL;
__pyx_t_2.data = NULL;
- /* "mettagrid/c_grid.pyx":43
+ /* "env/mettagrid/c_grid.pyx":43
* self.grid = grid
* self.observations = observations
* self.agent_positions = agent_positions # <<<<<<<<<<<<<<
@@ -17873,7 +17894,7 @@ static int __pyx_pf_9mettagrid_6c_grid_11Environment___init__(struct __pyx_obj_9
__pyx_t_3.memview = NULL;
__pyx_t_3.data = NULL;
- /* "mettagrid/c_grid.pyx":44
+ /* "env/mettagrid/c_grid.pyx":44
* self.observations = observations
* self.agent_positions = agent_positions
* self.spawn_position_cands = spawn_position_cands # <<<<<<<<<<<<<<
@@ -17886,7 +17907,7 @@ static int __pyx_pf_9mettagrid_6c_grid_11Environment___init__(struct __pyx_obj_9
__pyx_t_3.memview = NULL;
__pyx_t_3.data = NULL;
- /* "mettagrid/c_grid.pyx":33
+ /* "env/mettagrid/c_grid.pyx":33
* unsigned int[:, :] spawn_position_cands
*
* def __init__(self, grid, agent_positions, spawn_position_cands, observations, # <<<<<<<<<<<<<<
@@ -17901,13 +17922,13 @@ static int __pyx_pf_9mettagrid_6c_grid_11Environment___init__(struct __pyx_obj_9
__PYX_XCLEAR_MEMVIEW(&__pyx_t_1, 1);
__PYX_XCLEAR_MEMVIEW(&__pyx_t_2, 1);
__PYX_XCLEAR_MEMVIEW(&__pyx_t_3, 1);
- __Pyx_AddTraceback("mettagrid.c_grid.Environment.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("env.mettagrid.c_grid.Environment.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
return __pyx_r;
}
-/* "mettagrid/c_grid.pyx":46
+/* "env/mettagrid/c_grid.pyx":46
* self.spawn_position_cands = spawn_position_cands
*
* cdef void _compute_observations(self): # <<<<<<<<<<<<<<
@@ -17915,7 +17936,7 @@ static int __pyx_pf_9mettagrid_6c_grid_11Environment___init__(struct __pyx_obj_9
* for agent_idx in range(self.num_agents):
*/
-static void __pyx_f_9mettagrid_6c_grid_11Environment__compute_observations(struct __pyx_obj_9mettagrid_6c_grid_Environment *__pyx_v_self) {
+static void __pyx_f_3env_9mettagrid_6c_grid_11Environment__compute_observations(struct __pyx_obj_3env_9mettagrid_6c_grid_Environment *__pyx_v_self) {
int __pyx_v_r;
int __pyx_v_c;
int __pyx_v_agent_idx;
@@ -17931,7 +17952,7 @@ static void __pyx_f_9mettagrid_6c_grid_11Environment__compute_observations(struc
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
- /* "mettagrid/c_grid.pyx":48
+ /* "env/mettagrid/c_grid.pyx":48
* cdef void _compute_observations(self):
* cdef int r, c, agent_idx
* for agent_idx in range(self.num_agents): # <<<<<<<<<<<<<<
@@ -17943,7 +17964,7 @@ static void __pyx_f_9mettagrid_6c_grid_11Environment__compute_observations(struc
for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
__pyx_v_agent_idx = __pyx_t_3;
- /* "mettagrid/c_grid.pyx":49
+ /* "env/mettagrid/c_grid.pyx":49
* cdef int r, c, agent_idx
* for agent_idx in range(self.num_agents):
* r = self.agent_positions[agent_idx, 0] # <<<<<<<<<<<<<<
@@ -17954,7 +17975,7 @@ static void __pyx_f_9mettagrid_6c_grid_11Environment__compute_observations(struc
__pyx_t_5 = 0;
__pyx_v_r = (*((unsigned int *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_self->agent_positions.data + __pyx_t_4 * __pyx_v_self->agent_positions.strides[0]) ) + __pyx_t_5 * __pyx_v_self->agent_positions.strides[1]) )));
- /* "mettagrid/c_grid.pyx":50
+ /* "env/mettagrid/c_grid.pyx":50
* for agent_idx in range(self.num_agents):
* r = self.agent_positions[agent_idx, 0]
* c = self.agent_positions[agent_idx, 1] # <<<<<<<<<<<<<<
@@ -17965,7 +17986,7 @@ static void __pyx_f_9mettagrid_6c_grid_11Environment__compute_observations(struc
__pyx_t_4 = 1;
__pyx_v_c = (*((unsigned int *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_self->agent_positions.data + __pyx_t_5 * __pyx_v_self->agent_positions.strides[0]) ) + __pyx_t_4 * __pyx_v_self->agent_positions.strides[1]) )));
- /* "mettagrid/c_grid.pyx":51
+ /* "env/mettagrid/c_grid.pyx":51
* r = self.agent_positions[agent_idx, 0]
* c = self.agent_positions[agent_idx, 1]
* self.observations[agent_idx, :] = self.grid[ # <<<<<<<<<<<<<<
@@ -18034,7 +18055,7 @@ if (unlikely((__pyx_memoryview_copy_contents(__pyx_t_6, __pyx_t_8, 2, 2, 0) < 0)
__pyx_t_6.memview = NULL; __pyx_t_6.data = NULL;
}
- /* "mettagrid/c_grid.pyx":46
+ /* "env/mettagrid/c_grid.pyx":46
* self.spawn_position_cands = spawn_position_cands
*
* cdef void _compute_observations(self): # <<<<<<<<<<<<<<
@@ -18047,11 +18068,11 @@ if (unlikely((__pyx_memoryview_copy_contents(__pyx_t_6, __pyx_t_8, 2, 2, 0) < 0)
__pyx_L1_error:;
__PYX_XCLEAR_MEMVIEW(&__pyx_t_6, 1);
__PYX_XCLEAR_MEMVIEW(&__pyx_t_8, 1);
- __Pyx_AddTraceback("mettagrid.c_grid.Environment._compute_observations", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("env.mettagrid.c_grid.Environment._compute_observations", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_L0:;
}
-/* "mettagrid/c_grid.pyx":56
+/* "env/mettagrid/c_grid.pyx":56
* ]
*
* def reset(self, observations, seed=0): # <<<<<<<<<<<<<<
@@ -18060,15 +18081,15 @@ if (unlikely((__pyx_memoryview_copy_contents(__pyx_t_6, __pyx_t_8, 2, 2, 0) < 0)
*/
/* Python wrapper */
-static PyObject *__pyx_pw_9mettagrid_6c_grid_11Environment_3reset(PyObject *__pyx_v_self,
+static PyObject *__pyx_pw_3env_9mettagrid_6c_grid_11Environment_3reset(PyObject *__pyx_v_self,
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
-static PyMethodDef __pyx_mdef_9mettagrid_6c_grid_11Environment_3reset = {"reset", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9mettagrid_6c_grid_11Environment_3reset, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
-static PyObject *__pyx_pw_9mettagrid_6c_grid_11Environment_3reset(PyObject *__pyx_v_self,
+static PyMethodDef __pyx_mdef_3env_9mettagrid_6c_grid_11Environment_3reset = {"reset", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_3env_9mettagrid_6c_grid_11Environment_3reset, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_3env_9mettagrid_6c_grid_11Environment_3reset(PyObject *__pyx_v_self,
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
@@ -18154,11 +18175,11 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
__Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
}
}
- __Pyx_AddTraceback("mettagrid.c_grid.Environment.reset", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("env.mettagrid.c_grid.Environment.reset", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_9mettagrid_6c_grid_11Environment_2reset(((struct __pyx_obj_9mettagrid_6c_grid_Environment *)__pyx_v_self), __pyx_v_observations, __pyx_v_seed);
+ __pyx_r = __pyx_pf_3env_9mettagrid_6c_grid_11Environment_2reset(((struct __pyx_obj_3env_9mettagrid_6c_grid_Environment *)__pyx_v_self), __pyx_v_observations, __pyx_v_seed);
/* function exit code */
{
@@ -18171,7 +18192,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
return __pyx_r;
}
-static PyObject *__pyx_pf_9mettagrid_6c_grid_11Environment_2reset(struct __pyx_obj_9mettagrid_6c_grid_Environment *__pyx_v_self, PyObject *__pyx_v_observations, CYTHON_UNUSED PyObject *__pyx_v_seed) {
+static PyObject *__pyx_pf_3env_9mettagrid_6c_grid_11Environment_2reset(struct __pyx_obj_3env_9mettagrid_6c_grid_Environment *__pyx_v_self, PyObject *__pyx_v_observations, CYTHON_UNUSED PyObject *__pyx_v_seed) {
int __pyx_v_left;
int __pyx_v_right;
int __pyx_v_spawn_idx;
@@ -18193,7 +18214,7 @@ static PyObject *__pyx_pf_9mettagrid_6c_grid_11Environment_2reset(struct __pyx_o
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("reset", 1);
- /* "mettagrid/c_grid.pyx":57
+ /* "env/mettagrid/c_grid.pyx":57
*
* def reset(self, observations, seed=0):
* self.observations = observations # <<<<<<<<<<<<<<
@@ -18206,7 +18227,7 @@ static PyObject *__pyx_pf_9mettagrid_6c_grid_11Environment_2reset(struct __pyx_o
__pyx_t_1.memview = NULL;
__pyx_t_1.data = NULL;
- /* "mettagrid/c_grid.pyx":60
+ /* "env/mettagrid/c_grid.pyx":60
*
* # Add borders
* cdef int left = self.vision_range # <<<<<<<<<<<<<<
@@ -18216,7 +18237,7 @@ static PyObject *__pyx_pf_9mettagrid_6c_grid_11Environment_2reset(struct __pyx_o
__pyx_t_2 = __pyx_v_self->vision_range;
__pyx_v_left = __pyx_t_2;
- /* "mettagrid/c_grid.pyx":61
+ /* "env/mettagrid/c_grid.pyx":61
* # Add borders
* cdef int left = self.vision_range
* cdef int right = self.map_size - self.vision_range - 1 # <<<<<<<<<<<<<<
@@ -18225,7 +18246,7 @@ static PyObject *__pyx_pf_9mettagrid_6c_grid_11Environment_2reset(struct __pyx_o
*/
__pyx_v_right = ((__pyx_v_self->map_size - __pyx_v_self->vision_range) - 1);
- /* "mettagrid/c_grid.pyx":62
+ /* "env/mettagrid/c_grid.pyx":62
* cdef int left = self.vision_range
* cdef int right = self.map_size - self.vision_range - 1
* self.grid[:left, :] = WALL # <<<<<<<<<<<<<<
@@ -18258,7 +18279,7 @@ __pyx_t_3.strides[1] = __pyx_v_self->grid.strides[1];
__pyx_t_3.suboffsets[1] = -1;
{
- unsigned char __pyx_temp_scalar = __pyx_v_9mettagrid_6c_grid_WALL;
+ unsigned char __pyx_temp_scalar = __pyx_v_3env_9mettagrid_6c_grid_WALL;
{
Py_ssize_t __pyx_temp_extent_0 = __pyx_t_3.shape[0];
Py_ssize_t __pyx_temp_stride_0 = __pyx_t_3.strides[0];
@@ -18282,7 +18303,7 @@ __pyx_t_3.strides[1] = __pyx_v_self->grid.strides[1];
__PYX_XCLEAR_MEMVIEW(&__pyx_t_3, 1);
__pyx_t_3.memview = NULL; __pyx_t_3.data = NULL;
- /* "mettagrid/c_grid.pyx":63
+ /* "env/mettagrid/c_grid.pyx":63
* cdef int right = self.map_size - self.vision_range - 1
* self.grid[:left, :] = WALL
* self.grid[right:, :] = WALL # <<<<<<<<<<<<<<
@@ -18315,7 +18336,7 @@ __pyx_t_3.strides[1] = __pyx_v_self->grid.strides[1];
__pyx_t_3.suboffsets[1] = -1;
{
- unsigned char __pyx_temp_scalar = __pyx_v_9mettagrid_6c_grid_WALL;
+ unsigned char __pyx_temp_scalar = __pyx_v_3env_9mettagrid_6c_grid_WALL;
{
Py_ssize_t __pyx_temp_extent_0 = __pyx_t_3.shape[0];
Py_ssize_t __pyx_temp_stride_0 = __pyx_t_3.strides[0];
@@ -18339,7 +18360,7 @@ __pyx_t_3.strides[1] = __pyx_v_self->grid.strides[1];
__PYX_XCLEAR_MEMVIEW(&__pyx_t_3, 1);
__pyx_t_3.memview = NULL; __pyx_t_3.data = NULL;
- /* "mettagrid/c_grid.pyx":64
+ /* "env/mettagrid/c_grid.pyx":64
* self.grid[:left, :] = WALL
* self.grid[right:, :] = WALL
* self.grid[:, :left] = WALL # <<<<<<<<<<<<<<
@@ -18372,7 +18393,7 @@ __pyx_t_2 = -1;
}
{
- unsigned char __pyx_temp_scalar = __pyx_v_9mettagrid_6c_grid_WALL;
+ unsigned char __pyx_temp_scalar = __pyx_v_3env_9mettagrid_6c_grid_WALL;
{
Py_ssize_t __pyx_temp_extent_0 = __pyx_t_3.shape[0];
Py_ssize_t __pyx_temp_stride_0 = __pyx_t_3.strides[0];
@@ -18396,7 +18417,7 @@ __pyx_t_2 = -1;
__PYX_XCLEAR_MEMVIEW(&__pyx_t_3, 1);
__pyx_t_3.memview = NULL; __pyx_t_3.data = NULL;
- /* "mettagrid/c_grid.pyx":65
+ /* "env/mettagrid/c_grid.pyx":65
* self.grid[right:, :] = WALL
* self.grid[:, :left] = WALL
* self.grid[:, right:] = WALL # <<<<<<<<<<<<<<
@@ -18429,7 +18450,7 @@ __pyx_t_2 = -1;
}
{
- unsigned char __pyx_temp_scalar = __pyx_v_9mettagrid_6c_grid_WALL;
+ unsigned char __pyx_temp_scalar = __pyx_v_3env_9mettagrid_6c_grid_WALL;
{
Py_ssize_t __pyx_temp_extent_0 = __pyx_t_3.shape[0];
Py_ssize_t __pyx_temp_stride_0 = __pyx_t_3.strides[0];
@@ -18453,7 +18474,7 @@ __pyx_t_2 = -1;
__PYX_XCLEAR_MEMVIEW(&__pyx_t_3, 1);
__pyx_t_3.memview = NULL; __pyx_t_3.data = NULL;
- /* "mettagrid/c_grid.pyx":69
+ /* "env/mettagrid/c_grid.pyx":69
* # Agent spawning
* cdef int spawn_idx, r, c
* cdef int agent_idx = 0 # <<<<<<<<<<<<<<
@@ -18462,7 +18483,7 @@ __pyx_t_2 = -1;
*/
__pyx_v_agent_idx = 0;
- /* "mettagrid/c_grid.pyx":70
+ /* "env/mettagrid/c_grid.pyx":70
* cdef int spawn_idx, r, c
* cdef int agent_idx = 0
* for spawn_idx in range(self.map_size**2): # <<<<<<<<<<<<<<
@@ -18474,7 +18495,7 @@ __pyx_t_2 = -1;
for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_5; __pyx_t_2+=1) {
__pyx_v_spawn_idx = __pyx_t_2;
- /* "mettagrid/c_grid.pyx":71
+ /* "env/mettagrid/c_grid.pyx":71
* cdef int agent_idx = 0
* for spawn_idx in range(self.map_size**2):
* r = self.spawn_position_cands[spawn_idx, 0] # <<<<<<<<<<<<<<
@@ -18485,7 +18506,7 @@ __pyx_t_2 = -1;
__pyx_t_7 = 0;
__pyx_v_r = (*((unsigned int *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_self->spawn_position_cands.data + __pyx_t_6 * __pyx_v_self->spawn_position_cands.strides[0]) ) + __pyx_t_7 * __pyx_v_self->spawn_position_cands.strides[1]) )));
- /* "mettagrid/c_grid.pyx":72
+ /* "env/mettagrid/c_grid.pyx":72
* for spawn_idx in range(self.map_size**2):
* r = self.spawn_position_cands[spawn_idx, 0]
* c = self.spawn_position_cands[spawn_idx, 1] # <<<<<<<<<<<<<<
@@ -18496,7 +18517,7 @@ __pyx_t_2 = -1;
__pyx_t_6 = 1;
__pyx_v_c = (*((unsigned int *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_self->spawn_position_cands.data + __pyx_t_7 * __pyx_v_self->spawn_position_cands.strides[0]) ) + __pyx_t_6 * __pyx_v_self->spawn_position_cands.strides[1]) )));
- /* "mettagrid/c_grid.pyx":73
+ /* "env/mettagrid/c_grid.pyx":73
* r = self.spawn_position_cands[spawn_idx, 0]
* c = self.spawn_position_cands[spawn_idx, 1]
* if self.grid[r, c] == 0: # <<<<<<<<<<<<<<
@@ -18508,7 +18529,7 @@ __pyx_t_2 = -1;
__pyx_t_8 = ((*((unsigned char *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_self->grid.data + __pyx_t_6 * __pyx_v_self->grid.strides[0]) ) + __pyx_t_7 * __pyx_v_self->grid.strides[1]) ))) == 0);
if (__pyx_t_8) {
- /* "mettagrid/c_grid.pyx":74
+ /* "env/mettagrid/c_grid.pyx":74
* c = self.spawn_position_cands[spawn_idx, 1]
* if self.grid[r, c] == 0:
* self.grid[r, c] = AGENT # <<<<<<<<<<<<<<
@@ -18517,9 +18538,9 @@ __pyx_t_2 = -1;
*/
__pyx_t_7 = __pyx_v_r;
__pyx_t_6 = __pyx_v_c;
- *((unsigned char *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_self->grid.data + __pyx_t_7 * __pyx_v_self->grid.strides[0]) ) + __pyx_t_6 * __pyx_v_self->grid.strides[1]) )) = __pyx_v_9mettagrid_6c_grid_AGENT;
+ *((unsigned char *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_self->grid.data + __pyx_t_7 * __pyx_v_self->grid.strides[0]) ) + __pyx_t_6 * __pyx_v_self->grid.strides[1]) )) = __pyx_v_3env_9mettagrid_6c_grid_AGENT;
- /* "mettagrid/c_grid.pyx":75
+ /* "env/mettagrid/c_grid.pyx":75
* if self.grid[r, c] == 0:
* self.grid[r, c] = AGENT
* self.agent_positions[agent_idx, 0] = r # <<<<<<<<<<<<<<
@@ -18530,7 +18551,7 @@ __pyx_t_2 = -1;
__pyx_t_7 = 0;
*((unsigned int *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_self->agent_positions.data + __pyx_t_6 * __pyx_v_self->agent_positions.strides[0]) ) + __pyx_t_7 * __pyx_v_self->agent_positions.strides[1]) )) = __pyx_v_r;
- /* "mettagrid/c_grid.pyx":76
+ /* "env/mettagrid/c_grid.pyx":76
* self.grid[r, c] = AGENT
* self.agent_positions[agent_idx, 0] = r
* self.agent_positions[agent_idx, 1] = c # <<<<<<<<<<<<<<
@@ -18541,7 +18562,7 @@ __pyx_t_2 = -1;
__pyx_t_6 = 1;
*((unsigned int *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_self->agent_positions.data + __pyx_t_7 * __pyx_v_self->agent_positions.strides[0]) ) + __pyx_t_6 * __pyx_v_self->agent_positions.strides[1]) )) = __pyx_v_c;
- /* "mettagrid/c_grid.pyx":77
+ /* "env/mettagrid/c_grid.pyx":77
* self.agent_positions[agent_idx, 0] = r
* self.agent_positions[agent_idx, 1] = c
* agent_idx += 1 # <<<<<<<<<<<<<<
@@ -18550,7 +18571,7 @@ __pyx_t_2 = -1;
*/
__pyx_v_agent_idx = (__pyx_v_agent_idx + 1);
- /* "mettagrid/c_grid.pyx":78
+ /* "env/mettagrid/c_grid.pyx":78
* self.agent_positions[agent_idx, 1] = c
* agent_idx += 1
* if agent_idx == self.num_agents: # <<<<<<<<<<<<<<
@@ -18560,7 +18581,7 @@ __pyx_t_2 = -1;
__pyx_t_8 = (__pyx_v_agent_idx == __pyx_v_self->num_agents);
if (__pyx_t_8) {
- /* "mettagrid/c_grid.pyx":79
+ /* "env/mettagrid/c_grid.pyx":79
* agent_idx += 1
* if agent_idx == self.num_agents:
* break # <<<<<<<<<<<<<<
@@ -18569,7 +18590,7 @@ __pyx_t_2 = -1;
*/
goto __pyx_L4_break;
- /* "mettagrid/c_grid.pyx":78
+ /* "env/mettagrid/c_grid.pyx":78
* self.agent_positions[agent_idx, 1] = c
* agent_idx += 1
* if agent_idx == self.num_agents: # <<<<<<<<<<<<<<
@@ -18578,7 +18599,7 @@ __pyx_t_2 = -1;
*/
}
- /* "mettagrid/c_grid.pyx":73
+ /* "env/mettagrid/c_grid.pyx":73
* r = self.spawn_position_cands[spawn_idx, 0]
* c = self.spawn_position_cands[spawn_idx, 1]
* if self.grid[r, c] == 0: # <<<<<<<<<<<<<<
@@ -18589,16 +18610,16 @@ __pyx_t_2 = -1;
}
__pyx_L4_break:;
- /* "mettagrid/c_grid.pyx":81
+ /* "env/mettagrid/c_grid.pyx":81
* break
*
* self._compute_observations() # <<<<<<<<<<<<<<
*
* def step(self, np_actions):
*/
- ((struct __pyx_vtabstruct_9mettagrid_6c_grid_Environment *)__pyx_v_self->__pyx_vtab)->_compute_observations(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 81, __pyx_L1_error)
+ ((struct __pyx_vtabstruct_3env_9mettagrid_6c_grid_Environment *)__pyx_v_self->__pyx_vtab)->_compute_observations(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 81, __pyx_L1_error)
- /* "mettagrid/c_grid.pyx":56
+ /* "env/mettagrid/c_grid.pyx":56
* ]
*
* def reset(self, observations, seed=0): # <<<<<<<<<<<<<<
@@ -18612,7 +18633,7 @@ __pyx_t_2 = -1;
__pyx_L1_error:;
__PYX_XCLEAR_MEMVIEW(&__pyx_t_1, 1);
__PYX_XCLEAR_MEMVIEW(&__pyx_t_3, 1);
- __Pyx_AddTraceback("mettagrid.c_grid.Environment.reset", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("env.mettagrid.c_grid.Environment.reset", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
@@ -18620,7 +18641,7 @@ __pyx_t_2 = -1;
return __pyx_r;
}
-/* "mettagrid/c_grid.pyx":83
+/* "env/mettagrid/c_grid.pyx":83
* self._compute_observations()
*
* def step(self, np_actions): # <<<<<<<<<<<<<<
@@ -18629,15 +18650,15 @@ __pyx_t_2 = -1;
*/
/* Python wrapper */
-static PyObject *__pyx_pw_9mettagrid_6c_grid_11Environment_5step(PyObject *__pyx_v_self,
+static PyObject *__pyx_pw_3env_9mettagrid_6c_grid_11Environment_5step(PyObject *__pyx_v_self,
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
-static PyMethodDef __pyx_mdef_9mettagrid_6c_grid_11Environment_5step = {"step", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9mettagrid_6c_grid_11Environment_5step, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
-static PyObject *__pyx_pw_9mettagrid_6c_grid_11Environment_5step(PyObject *__pyx_v_self,
+static PyMethodDef __pyx_mdef_3env_9mettagrid_6c_grid_11Environment_5step = {"step", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_3env_9mettagrid_6c_grid_11Environment_5step, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_3env_9mettagrid_6c_grid_11Environment_5step(PyObject *__pyx_v_self,
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
@@ -18707,11 +18728,11 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
__Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
}
}
- __Pyx_AddTraceback("mettagrid.c_grid.Environment.step", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("env.mettagrid.c_grid.Environment.step", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_9mettagrid_6c_grid_11Environment_4step(((struct __pyx_obj_9mettagrid_6c_grid_Environment *)__pyx_v_self), __pyx_v_np_actions);
+ __pyx_r = __pyx_pf_3env_9mettagrid_6c_grid_11Environment_4step(((struct __pyx_obj_3env_9mettagrid_6c_grid_Environment *)__pyx_v_self), __pyx_v_np_actions);
/* function exit code */
{
@@ -18724,7 +18745,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
return __pyx_r;
}
-static PyObject *__pyx_pf_9mettagrid_6c_grid_11Environment_4step(struct __pyx_obj_9mettagrid_6c_grid_Environment *__pyx_v_self, PyObject *__pyx_v_np_actions) {
+static PyObject *__pyx_pf_3env_9mettagrid_6c_grid_11Environment_4step(struct __pyx_obj_3env_9mettagrid_6c_grid_Environment *__pyx_v_self, PyObject *__pyx_v_np_actions) {
__Pyx_memviewslice __pyx_v_actions = { 0, 0, { 0 }, { 0 }, { 0 } };
int __pyx_v_agent_idx;
int __pyx_v_atn;
@@ -18750,7 +18771,7 @@ static PyObject *__pyx_pf_9mettagrid_6c_grid_11Environment_4step(struct __pyx_ob
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("step", 1);
- /* "mettagrid/c_grid.pyx":84
+ /* "env/mettagrid/c_grid.pyx":84
*
* def step(self, np_actions):
* cdef unsigned int[:] actions = np_actions # <<<<<<<<<<<<<<
@@ -18762,7 +18783,7 @@ static PyObject *__pyx_pf_9mettagrid_6c_grid_11Environment_4step(struct __pyx_ob
__pyx_t_1.memview = NULL;
__pyx_t_1.data = NULL;
- /* "mettagrid/c_grid.pyx":86
+ /* "env/mettagrid/c_grid.pyx":86
* cdef unsigned int[:] actions = np_actions
* cdef int agent_idx, atn, r, c, dr, dc, dest_r, dest_c
* for agent_idx in range(self.num_agents): # <<<<<<<<<<<<<<
@@ -18774,7 +18795,7 @@ static PyObject *__pyx_pf_9mettagrid_6c_grid_11Environment_4step(struct __pyx_ob
for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
__pyx_v_agent_idx = __pyx_t_4;
- /* "mettagrid/c_grid.pyx":87
+ /* "env/mettagrid/c_grid.pyx":87
* cdef int agent_idx, atn, r, c, dr, dc, dest_r, dest_c
* for agent_idx in range(self.num_agents):
* r = self.agent_positions[agent_idx, 0] # <<<<<<<<<<<<<<
@@ -18785,7 +18806,7 @@ static PyObject *__pyx_pf_9mettagrid_6c_grid_11Environment_4step(struct __pyx_ob
__pyx_t_6 = 0;
__pyx_v_r = (*((unsigned int *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_self->agent_positions.data + __pyx_t_5 * __pyx_v_self->agent_positions.strides[0]) ) + __pyx_t_6 * __pyx_v_self->agent_positions.strides[1]) )));
- /* "mettagrid/c_grid.pyx":88
+ /* "env/mettagrid/c_grid.pyx":88
* for agent_idx in range(self.num_agents):
* r = self.agent_positions[agent_idx, 0]
* c = self.agent_positions[agent_idx, 1] # <<<<<<<<<<<<<<
@@ -18796,7 +18817,7 @@ static PyObject *__pyx_pf_9mettagrid_6c_grid_11Environment_4step(struct __pyx_ob
__pyx_t_5 = 1;
__pyx_v_c = (*((unsigned int *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_self->agent_positions.data + __pyx_t_6 * __pyx_v_self->agent_positions.strides[0]) ) + __pyx_t_5 * __pyx_v_self->agent_positions.strides[1]) )));
- /* "mettagrid/c_grid.pyx":89
+ /* "env/mettagrid/c_grid.pyx":89
* r = self.agent_positions[agent_idx, 0]
* c = self.agent_positions[agent_idx, 1]
* atn = actions[agent_idx] # <<<<<<<<<<<<<<
@@ -18806,7 +18827,7 @@ static PyObject *__pyx_pf_9mettagrid_6c_grid_11Environment_4step(struct __pyx_ob
__pyx_t_5 = __pyx_v_agent_idx;
__pyx_v_atn = (*((unsigned int *) ( /* dim=0 */ (__pyx_v_actions.data + __pyx_t_5 * __pyx_v_actions.strides[0]) )));
- /* "mettagrid/c_grid.pyx":90
+ /* "env/mettagrid/c_grid.pyx":90
* c = self.agent_positions[agent_idx, 1]
* atn = actions[agent_idx]
* dr = 0 # <<<<<<<<<<<<<<
@@ -18815,7 +18836,7 @@ static PyObject *__pyx_pf_9mettagrid_6c_grid_11Environment_4step(struct __pyx_ob
*/
__pyx_v_dr = 0;
- /* "mettagrid/c_grid.pyx":91
+ /* "env/mettagrid/c_grid.pyx":91
* atn = actions[agent_idx]
* dr = 0
* dc = 0 # <<<<<<<<<<<<<<
@@ -18824,17 +18845,17 @@ static PyObject *__pyx_pf_9mettagrid_6c_grid_11Environment_4step(struct __pyx_ob
*/
__pyx_v_dc = 0;
- /* "mettagrid/c_grid.pyx":92
+ /* "env/mettagrid/c_grid.pyx":92
* dr = 0
* dc = 0
* if atn == PASS: # <<<<<<<<<<<<<<
* continue
* elif atn == NORTH:
*/
- __pyx_t_7 = (__pyx_v_atn == __pyx_v_9mettagrid_6c_grid_PASS);
+ __pyx_t_7 = (__pyx_v_atn == __pyx_v_3env_9mettagrid_6c_grid_PASS);
if (__pyx_t_7) {
- /* "mettagrid/c_grid.pyx":93
+ /* "env/mettagrid/c_grid.pyx":93
* dc = 0
* if atn == PASS:
* continue # <<<<<<<<<<<<<<
@@ -18843,7 +18864,7 @@ static PyObject *__pyx_pf_9mettagrid_6c_grid_11Environment_4step(struct __pyx_ob
*/
goto __pyx_L3_continue;
- /* "mettagrid/c_grid.pyx":92
+ /* "env/mettagrid/c_grid.pyx":92
* dr = 0
* dc = 0
* if atn == PASS: # <<<<<<<<<<<<<<
@@ -18852,17 +18873,17 @@ static PyObject *__pyx_pf_9mettagrid_6c_grid_11Environment_4step(struct __pyx_ob
*/
}
- /* "mettagrid/c_grid.pyx":94
+ /* "env/mettagrid/c_grid.pyx":94
* if atn == PASS:
* continue
* elif atn == NORTH: # <<<<<<<<<<<<<<
* dr = -1
* elif atn == SOUTH:
*/
- __pyx_t_7 = (__pyx_v_atn == __pyx_v_9mettagrid_6c_grid_NORTH);
+ __pyx_t_7 = (__pyx_v_atn == __pyx_v_3env_9mettagrid_6c_grid_NORTH);
if (__pyx_t_7) {
- /* "mettagrid/c_grid.pyx":95
+ /* "env/mettagrid/c_grid.pyx":95
* continue
* elif atn == NORTH:
* dr = -1 # <<<<<<<<<<<<<<
@@ -18871,7 +18892,7 @@ static PyObject *__pyx_pf_9mettagrid_6c_grid_11Environment_4step(struct __pyx_ob
*/
__pyx_v_dr = -1;
- /* "mettagrid/c_grid.pyx":94
+ /* "env/mettagrid/c_grid.pyx":94
* if atn == PASS:
* continue
* elif atn == NORTH: # <<<<<<<<<<<<<<
@@ -18881,17 +18902,17 @@ static PyObject *__pyx_pf_9mettagrid_6c_grid_11Environment_4step(struct __pyx_ob
goto __pyx_L5;
}
- /* "mettagrid/c_grid.pyx":96
+ /* "env/mettagrid/c_grid.pyx":96
* elif atn == NORTH:
* dr = -1
* elif atn == SOUTH: # <<<<<<<<<<<<<<
* dr = 1
* elif atn == EAST:
*/
- __pyx_t_7 = (__pyx_v_atn == __pyx_v_9mettagrid_6c_grid_SOUTH);
+ __pyx_t_7 = (__pyx_v_atn == __pyx_v_3env_9mettagrid_6c_grid_SOUTH);
if (__pyx_t_7) {
- /* "mettagrid/c_grid.pyx":97
+ /* "env/mettagrid/c_grid.pyx":97
* dr = -1
* elif atn == SOUTH:
* dr = 1 # <<<<<<<<<<<<<<
@@ -18900,7 +18921,7 @@ static PyObject *__pyx_pf_9mettagrid_6c_grid_11Environment_4step(struct __pyx_ob
*/
__pyx_v_dr = 1;
- /* "mettagrid/c_grid.pyx":96
+ /* "env/mettagrid/c_grid.pyx":96
* elif atn == NORTH:
* dr = -1
* elif atn == SOUTH: # <<<<<<<<<<<<<<
@@ -18910,17 +18931,17 @@ static PyObject *__pyx_pf_9mettagrid_6c_grid_11Environment_4step(struct __pyx_ob
goto __pyx_L5;
}
- /* "mettagrid/c_grid.pyx":98
+ /* "env/mettagrid/c_grid.pyx":98
* elif atn == SOUTH:
* dr = 1
* elif atn == EAST: # <<<<<<<<<<<<<<
* dc = 1
* elif atn == WEST:
*/
- __pyx_t_7 = (__pyx_v_atn == __pyx_v_9mettagrid_6c_grid_EAST);
+ __pyx_t_7 = (__pyx_v_atn == __pyx_v_3env_9mettagrid_6c_grid_EAST);
if (__pyx_t_7) {
- /* "mettagrid/c_grid.pyx":99
+ /* "env/mettagrid/c_grid.pyx":99
* dr = 1
* elif atn == EAST:
* dc = 1 # <<<<<<<<<<<<<<
@@ -18929,7 +18950,7 @@ static PyObject *__pyx_pf_9mettagrid_6c_grid_11Environment_4step(struct __pyx_ob
*/
__pyx_v_dc = 1;
- /* "mettagrid/c_grid.pyx":98
+ /* "env/mettagrid/c_grid.pyx":98
* elif atn == SOUTH:
* dr = 1
* elif atn == EAST: # <<<<<<<<<<<<<<
@@ -18939,17 +18960,17 @@ static PyObject *__pyx_pf_9mettagrid_6c_grid_11Environment_4step(struct __pyx_ob
goto __pyx_L5;
}
- /* "mettagrid/c_grid.pyx":100
+ /* "env/mettagrid/c_grid.pyx":100
* elif atn == EAST:
* dc = 1
* elif atn == WEST: # <<<<<<<<<<<<<<
* dc = -1
* else:
*/
- __pyx_t_7 = (__pyx_v_atn == __pyx_v_9mettagrid_6c_grid_WEST);
+ __pyx_t_7 = (__pyx_v_atn == __pyx_v_3env_9mettagrid_6c_grid_WEST);
if (likely(__pyx_t_7)) {
- /* "mettagrid/c_grid.pyx":101
+ /* "env/mettagrid/c_grid.pyx":101
* dc = 1
* elif atn == WEST:
* dc = -1 # <<<<<<<<<<<<<<
@@ -18958,7 +18979,7 @@ static PyObject *__pyx_pf_9mettagrid_6c_grid_11Environment_4step(struct __pyx_ob
*/
__pyx_v_dc = -1;
- /* "mettagrid/c_grid.pyx":100
+ /* "env/mettagrid/c_grid.pyx":100
* elif atn == EAST:
* dc = 1
* elif atn == WEST: # <<<<<<<<<<<<<<
@@ -18968,7 +18989,7 @@ static PyObject *__pyx_pf_9mettagrid_6c_grid_11Environment_4step(struct __pyx_ob
goto __pyx_L5;
}
- /* "mettagrid/c_grid.pyx":103
+ /* "env/mettagrid/c_grid.pyx":103
* dc = -1
* else:
* raise ValueError(f'Invalid action: {atn}') # <<<<<<<<<<<<<<
@@ -18990,7 +19011,7 @@ static PyObject *__pyx_pf_9mettagrid_6c_grid_11Environment_4step(struct __pyx_ob
}
__pyx_L5:;
- /* "mettagrid/c_grid.pyx":105
+ /* "env/mettagrid/c_grid.pyx":105
* raise ValueError(f'Invalid action: {atn}')
*
* dest_r = r + dr # <<<<<<<<<<<<<<
@@ -18999,7 +19020,7 @@ static PyObject *__pyx_pf_9mettagrid_6c_grid_11Environment_4step(struct __pyx_ob
*/
__pyx_v_dest_r = (__pyx_v_r + __pyx_v_dr);
- /* "mettagrid/c_grid.pyx":106
+ /* "env/mettagrid/c_grid.pyx":106
*
* dest_r = r + dr
* dest_c = c + dc # <<<<<<<<<<<<<<
@@ -19008,7 +19029,7 @@ static PyObject *__pyx_pf_9mettagrid_6c_grid_11Environment_4step(struct __pyx_ob
*/
__pyx_v_dest_c = (__pyx_v_c + __pyx_v_dc);
- /* "mettagrid/c_grid.pyx":108
+ /* "env/mettagrid/c_grid.pyx":108
* dest_c = c + dc
*
* if self.grid[dest_r, dest_c] == 0: # <<<<<<<<<<<<<<
@@ -19020,7 +19041,7 @@ static PyObject *__pyx_pf_9mettagrid_6c_grid_11Environment_4step(struct __pyx_ob
__pyx_t_7 = ((*((unsigned char *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_self->grid.data + __pyx_t_5 * __pyx_v_self->grid.strides[0]) ) + __pyx_t_6 * __pyx_v_self->grid.strides[1]) ))) == 0);
if (__pyx_t_7) {
- /* "mettagrid/c_grid.pyx":109
+ /* "env/mettagrid/c_grid.pyx":109
*
* if self.grid[dest_r, dest_c] == 0:
* self.grid[r, c] = EMPTY # <<<<<<<<<<<<<<
@@ -19029,9 +19050,9 @@ static PyObject *__pyx_pf_9mettagrid_6c_grid_11Environment_4step(struct __pyx_ob
*/
__pyx_t_6 = __pyx_v_r;
__pyx_t_5 = __pyx_v_c;
- *((unsigned char *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_self->grid.data + __pyx_t_6 * __pyx_v_self->grid.strides[0]) ) + __pyx_t_5 * __pyx_v_self->grid.strides[1]) )) = __pyx_v_9mettagrid_6c_grid_EMPTY;
+ *((unsigned char *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_self->grid.data + __pyx_t_6 * __pyx_v_self->grid.strides[0]) ) + __pyx_t_5 * __pyx_v_self->grid.strides[1]) )) = __pyx_v_3env_9mettagrid_6c_grid_EMPTY;
- /* "mettagrid/c_grid.pyx":110
+ /* "env/mettagrid/c_grid.pyx":110
* if self.grid[dest_r, dest_c] == 0:
* self.grid[r, c] = EMPTY
* self.grid[dest_r, dest_c] = AGENT # <<<<<<<<<<<<<<
@@ -19040,9 +19061,9 @@ static PyObject *__pyx_pf_9mettagrid_6c_grid_11Environment_4step(struct __pyx_ob
*/
__pyx_t_5 = __pyx_v_dest_r;
__pyx_t_6 = __pyx_v_dest_c;
- *((unsigned char *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_self->grid.data + __pyx_t_5 * __pyx_v_self->grid.strides[0]) ) + __pyx_t_6 * __pyx_v_self->grid.strides[1]) )) = __pyx_v_9mettagrid_6c_grid_AGENT;
+ *((unsigned char *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_self->grid.data + __pyx_t_5 * __pyx_v_self->grid.strides[0]) ) + __pyx_t_6 * __pyx_v_self->grid.strides[1]) )) = __pyx_v_3env_9mettagrid_6c_grid_AGENT;
- /* "mettagrid/c_grid.pyx":111
+ /* "env/mettagrid/c_grid.pyx":111
* self.grid[r, c] = EMPTY
* self.grid[dest_r, dest_c] = AGENT
* self.agent_positions[agent_idx, 0] = dest_r # <<<<<<<<<<<<<<
@@ -19053,7 +19074,7 @@ static PyObject *__pyx_pf_9mettagrid_6c_grid_11Environment_4step(struct __pyx_ob
__pyx_t_5 = 0;
*((unsigned int *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_self->agent_positions.data + __pyx_t_6 * __pyx_v_self->agent_positions.strides[0]) ) + __pyx_t_5 * __pyx_v_self->agent_positions.strides[1]) )) = __pyx_v_dest_r;
- /* "mettagrid/c_grid.pyx":112
+ /* "env/mettagrid/c_grid.pyx":112
* self.grid[dest_r, dest_c] = AGENT
* self.agent_positions[agent_idx, 0] = dest_r
* self.agent_positions[agent_idx, 1] = dest_c # <<<<<<<<<<<<<<
@@ -19064,7 +19085,7 @@ static PyObject *__pyx_pf_9mettagrid_6c_grid_11Environment_4step(struct __pyx_ob
__pyx_t_6 = 1;
*((unsigned int *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_self->agent_positions.data + __pyx_t_5 * __pyx_v_self->agent_positions.strides[0]) ) + __pyx_t_6 * __pyx_v_self->agent_positions.strides[1]) )) = __pyx_v_dest_c;
- /* "mettagrid/c_grid.pyx":108
+ /* "env/mettagrid/c_grid.pyx":108
* dest_c = c + dc
*
* if self.grid[dest_r, dest_c] == 0: # <<<<<<<<<<<<<<
@@ -19075,14 +19096,14 @@ static PyObject *__pyx_pf_9mettagrid_6c_grid_11Environment_4step(struct __pyx_ob
__pyx_L3_continue:;
}
- /* "mettagrid/c_grid.pyx":114
+ /* "env/mettagrid/c_grid.pyx":114
* self.agent_positions[agent_idx, 1] = dest_c
*
* self._compute_observations() # <<<<<<<<<<<<<<
*/
- ((struct __pyx_vtabstruct_9mettagrid_6c_grid_Environment *)__pyx_v_self->__pyx_vtab)->_compute_observations(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 114, __pyx_L1_error)
+ ((struct __pyx_vtabstruct_3env_9mettagrid_6c_grid_Environment *)__pyx_v_self->__pyx_vtab)->_compute_observations(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 114, __pyx_L1_error)
- /* "mettagrid/c_grid.pyx":83
+ /* "env/mettagrid/c_grid.pyx":83
* self._compute_observations()
*
* def step(self, np_actions): # <<<<<<<<<<<<<<
@@ -19097,7 +19118,7 @@ static PyObject *__pyx_pf_9mettagrid_6c_grid_11Environment_4step(struct __pyx_ob
__PYX_XCLEAR_MEMVIEW(&__pyx_t_1, 1);
__Pyx_XDECREF(__pyx_t_8);
__Pyx_XDECREF(__pyx_t_9);
- __Pyx_AddTraceback("mettagrid.c_grid.Environment.step", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("env.mettagrid.c_grid.Environment.step", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__PYX_XCLEAR_MEMVIEW(&__pyx_v_actions, 1);
@@ -19113,15 +19134,15 @@ static PyObject *__pyx_pf_9mettagrid_6c_grid_11Environment_4step(struct __pyx_ob
*/
/* Python wrapper */
-static PyObject *__pyx_pw_9mettagrid_6c_grid_11Environment_7__reduce_cython__(PyObject *__pyx_v_self,
+static PyObject *__pyx_pw_3env_9mettagrid_6c_grid_11Environment_7__reduce_cython__(PyObject *__pyx_v_self,
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
-static PyMethodDef __pyx_mdef_9mettagrid_6c_grid_11Environment_7__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9mettagrid_6c_grid_11Environment_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
-static PyObject *__pyx_pw_9mettagrid_6c_grid_11Environment_7__reduce_cython__(PyObject *__pyx_v_self,
+static PyMethodDef __pyx_mdef_3env_9mettagrid_6c_grid_11Environment_7__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_3env_9mettagrid_6c_grid_11Environment_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_3env_9mettagrid_6c_grid_11Environment_7__reduce_cython__(PyObject *__pyx_v_self,
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
@@ -19146,14 +19167,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
if (unlikely(__pyx_nargs > 0)) {
__Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
- __pyx_r = __pyx_pf_9mettagrid_6c_grid_11Environment_6__reduce_cython__(((struct __pyx_obj_9mettagrid_6c_grid_Environment *)__pyx_v_self));
+ __pyx_r = __pyx_pf_3env_9mettagrid_6c_grid_11Environment_6__reduce_cython__(((struct __pyx_obj_3env_9mettagrid_6c_grid_Environment *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_pf_9mettagrid_6c_grid_11Environment_6__reduce_cython__(struct __pyx_obj_9mettagrid_6c_grid_Environment *__pyx_v_self) {
+static PyObject *__pyx_pf_3env_9mettagrid_6c_grid_11Environment_6__reduce_cython__(struct __pyx_obj_3env_9mettagrid_6c_grid_Environment *__pyx_v_self) {
PyObject *__pyx_v_state = 0;
PyObject *__pyx_v__dict = 0;
int __pyx_v_use_setstate;
@@ -19410,7 +19431,7 @@ static PyObject *__pyx_pf_9mettagrid_6c_grid_11Environment_6__reduce_cython__(st
__Pyx_XDECREF(__pyx_t_8);
__Pyx_XDECREF(__pyx_t_9);
__Pyx_XDECREF(__pyx_t_10);
- __Pyx_AddTraceback("mettagrid.c_grid.Environment.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("env.mettagrid.c_grid.Environment.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_state);
@@ -19428,15 +19449,15 @@ static PyObject *__pyx_pf_9mettagrid_6c_grid_11Environment_6__reduce_cython__(st
*/
/* Python wrapper */
-static PyObject *__pyx_pw_9mettagrid_6c_grid_11Environment_9__setstate_cython__(PyObject *__pyx_v_self,
+static PyObject *__pyx_pw_3env_9mettagrid_6c_grid_11Environment_9__setstate_cython__(PyObject *__pyx_v_self,
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
-static PyMethodDef __pyx_mdef_9mettagrid_6c_grid_11Environment_9__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9mettagrid_6c_grid_11Environment_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
-static PyObject *__pyx_pw_9mettagrid_6c_grid_11Environment_9__setstate_cython__(PyObject *__pyx_v_self,
+static PyMethodDef __pyx_mdef_3env_9mettagrid_6c_grid_11Environment_9__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_3env_9mettagrid_6c_grid_11Environment_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_3env_9mettagrid_6c_grid_11Environment_9__setstate_cython__(PyObject *__pyx_v_self,
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
@@ -19506,11 +19527,11 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
__Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
}
}
- __Pyx_AddTraceback("mettagrid.c_grid.Environment.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("env.mettagrid.c_grid.Environment.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_9mettagrid_6c_grid_11Environment_8__setstate_cython__(((struct __pyx_obj_9mettagrid_6c_grid_Environment *)__pyx_v_self), __pyx_v___pyx_state);
+ __pyx_r = __pyx_pf_3env_9mettagrid_6c_grid_11Environment_8__setstate_cython__(((struct __pyx_obj_3env_9mettagrid_6c_grid_Environment *)__pyx_v_self), __pyx_v___pyx_state);
/* function exit code */
{
@@ -19523,7 +19544,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
return __pyx_r;
}
-static PyObject *__pyx_pf_9mettagrid_6c_grid_11Environment_8__setstate_cython__(struct __pyx_obj_9mettagrid_6c_grid_Environment *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
+static PyObject *__pyx_pf_3env_9mettagrid_6c_grid_11Environment_8__setstate_cython__(struct __pyx_obj_3env_9mettagrid_6c_grid_Environment *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
@@ -19538,7 +19559,7 @@ static PyObject *__pyx_pf_9mettagrid_6c_grid_11Environment_8__setstate_cython__(
* __pyx_unpickle_Environment__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
*/
if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(1, 17, __pyx_L1_error)
- __pyx_t_1 = __pyx_f_9mettagrid_6c_grid___pyx_unpickle_Environment__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_3env_9mettagrid_6c_grid___pyx_unpickle_Environment__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
@@ -19554,7 +19575,7 @@ static PyObject *__pyx_pf_9mettagrid_6c_grid_11Environment_8__setstate_cython__(
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("mettagrid.c_grid.Environment.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("env.mettagrid.c_grid.Environment.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
@@ -19569,15 +19590,15 @@ static PyObject *__pyx_pf_9mettagrid_6c_grid_11Environment_8__setstate_cython__(
*/
/* Python wrapper */
-static PyObject *__pyx_pw_9mettagrid_6c_grid_1__pyx_unpickle_Environment(PyObject *__pyx_self,
+static PyObject *__pyx_pw_3env_9mettagrid_6c_grid_1__pyx_unpickle_Environment(PyObject *__pyx_self,
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
-static PyMethodDef __pyx_mdef_9mettagrid_6c_grid_1__pyx_unpickle_Environment = {"__pyx_unpickle_Environment", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9mettagrid_6c_grid_1__pyx_unpickle_Environment, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
-static PyObject *__pyx_pw_9mettagrid_6c_grid_1__pyx_unpickle_Environment(PyObject *__pyx_self,
+static PyMethodDef __pyx_mdef_3env_9mettagrid_6c_grid_1__pyx_unpickle_Environment = {"__pyx_unpickle_Environment", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_3env_9mettagrid_6c_grid_1__pyx_unpickle_Environment, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_3env_9mettagrid_6c_grid_1__pyx_unpickle_Environment(PyObject *__pyx_self,
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
@@ -19677,11 +19698,11 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
__Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
}
}
- __Pyx_AddTraceback("mettagrid.c_grid.__pyx_unpickle_Environment", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("env.mettagrid.c_grid.__pyx_unpickle_Environment", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_9mettagrid_6c_grid___pyx_unpickle_Environment(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
+ __pyx_r = __pyx_pf_3env_9mettagrid_6c_grid___pyx_unpickle_Environment(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
/* function exit code */
{
@@ -19694,7 +19715,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
return __pyx_r;
}
-static PyObject *__pyx_pf_9mettagrid_6c_grid___pyx_unpickle_Environment(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
+static PyObject *__pyx_pf_3env_9mettagrid_6c_grid___pyx_unpickle_Environment(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
PyObject *__pyx_v___pyx_PickleError = 0;
PyObject *__pyx_v___pyx_result = 0;
PyObject *__pyx_r = NULL;
@@ -19776,7 +19797,7 @@ static PyObject *__pyx_pf_9mettagrid_6c_grid___pyx_unpickle_Environment(CYTHON_U
* if __pyx_state is not None:
* __pyx_unpickle_Environment__set_state(<Environment> __pyx_result, __pyx_state)
*/
- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9mettagrid_6c_grid_Environment), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_3env_9mettagrid_6c_grid_Environment), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_4 = NULL;
__pyx_t_5 = 0;
@@ -19821,7 +19842,7 @@ static PyObject *__pyx_pf_9mettagrid_6c_grid___pyx_unpickle_Environment(CYTHON_U
* cdef __pyx_unpickle_Environment__set_state(Environment __pyx_result, tuple __pyx_state):
*/
if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(1, 9, __pyx_L1_error)
- __pyx_t_1 = __pyx_f_9mettagrid_6c_grid___pyx_unpickle_Environment__set_state(((struct __pyx_obj_9mettagrid_6c_grid_Environment *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 9, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_3env_9mettagrid_6c_grid___pyx_unpickle_Environment__set_state(((struct __pyx_obj_3env_9mettagrid_6c_grid_Environment *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 9, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
@@ -19857,7 +19878,7 @@ static PyObject *__pyx_pf_9mettagrid_6c_grid___pyx_unpickle_Environment(CYTHON_U
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4);
- __Pyx_AddTraceback("mettagrid.c_grid.__pyx_unpickle_Environment", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("env.mettagrid.c_grid.__pyx_unpickle_Environment", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v___pyx_PickleError);
@@ -19875,7 +19896,7 @@ static PyObject *__pyx_pf_9mettagrid_6c_grid___pyx_unpickle_Environment(CYTHON_U
* if len(__pyx_state) > 9 and hasattr(__pyx_result, '__dict__'):
*/
-static PyObject *__pyx_f_9mettagrid_6c_grid___pyx_unpickle_Environment__set_state(struct __pyx_obj_9mettagrid_6c_grid_Environment *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
+static PyObject *__pyx_f_3env_9mettagrid_6c_grid___pyx_unpickle_Environment__set_state(struct __pyx_obj_3env_9mettagrid_6c_grid_Environment *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
__Pyx_memviewslice __pyx_t_1 = { 0, 0, { 0 }, { 0 }, { 0 } };
@@ -20053,17 +20074,17 @@ static PyObject *__pyx_f_9mettagrid_6c_grid___pyx_unpickle_Environment__set_stat
__Pyx_XDECREF(__pyx_t_8);
__Pyx_XDECREF(__pyx_t_9);
__Pyx_XDECREF(__pyx_t_10);
- __Pyx_AddTraceback("mettagrid.c_grid.__pyx_unpickle_Environment__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("env.mettagrid.c_grid.__pyx_unpickle_Environment__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = 0;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static struct __pyx_vtabstruct_9mettagrid_6c_grid_Environment __pyx_vtable_9mettagrid_6c_grid_Environment;
+static struct __pyx_vtabstruct_3env_9mettagrid_6c_grid_Environment __pyx_vtable_3env_9mettagrid_6c_grid_Environment;
-static PyObject *__pyx_tp_new_9mettagrid_6c_grid_Environment(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
- struct __pyx_obj_9mettagrid_6c_grid_Environment *p;
+static PyObject *__pyx_tp_new_3env_9mettagrid_6c_grid_Environment(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_3env_9mettagrid_6c_grid_Environment *p;
PyObject *o;
#if CYTHON_COMPILING_IN_LIMITED_API
allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
@@ -20076,8 +20097,8 @@ static PyObject *__pyx_tp_new_9mettagrid_6c_grid_Environment(PyTypeObject *t, CY
}
if (unlikely(!o)) return 0;
#endif
- p = ((struct __pyx_obj_9mettagrid_6c_grid_Environment *)o);
- p->__pyx_vtab = __pyx_vtabptr_9mettagrid_6c_grid_Environment;
+ p = ((struct __pyx_obj_3env_9mettagrid_6c_grid_Environment *)o);
+ p->__pyx_vtab = __pyx_vtabptr_3env_9mettagrid_6c_grid_Environment;
p->grid.data = NULL;
p->grid.memview = NULL;
p->observations.data = NULL;
@@ -20089,11 +20110,11 @@ static PyObject *__pyx_tp_new_9mettagrid_6c_grid_Environment(PyTypeObject *t, CY
return o;
}
-static void __pyx_tp_dealloc_9mettagrid_6c_grid_Environment(PyObject *o) {
- struct __pyx_obj_9mettagrid_6c_grid_Environment *p = (struct __pyx_obj_9mettagrid_6c_grid_Environment *)o;
+static void __pyx_tp_dealloc_3env_9mettagrid_6c_grid_Environment(PyObject *o) {
+ struct __pyx_obj_3env_9mettagrid_6c_grid_Environment *p = (struct __pyx_obj_3env_9mettagrid_6c_grid_Environment *)o;
#if CYTHON_USE_TP_FINALIZE
if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) {
- if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_9mettagrid_6c_grid_Environment) {
+ if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_3env_9mettagrid_6c_grid_Environment) {
if (PyObject_CallFinalizerFromDealloc(o)) return;
}
}
@@ -20116,36 +20137,36 @@ static void __pyx_tp_dealloc_9mettagrid_6c_grid_Environment(PyObject *o) {
#endif
}
-static PyMethodDef __pyx_methods_9mettagrid_6c_grid_Environment[] = {
- {"reset", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9mettagrid_6c_grid_11Environment_3reset, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
- {"step", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9mettagrid_6c_grid_11Environment_5step, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
- {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9mettagrid_6c_grid_11Environment_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
- {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9mettagrid_6c_grid_11Environment_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
+static PyMethodDef __pyx_methods_3env_9mettagrid_6c_grid_Environment[] = {
+ {"reset", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_3env_9mettagrid_6c_grid_11Environment_3reset, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
+ {"step", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_3env_9mettagrid_6c_grid_11Environment_5step, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
+ {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_3env_9mettagrid_6c_grid_11Environment_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
+ {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_3env_9mettagrid_6c_grid_11Environment_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
{0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
-static PyType_Slot __pyx_type_9mettagrid_6c_grid_Environment_slots[] = {
- {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9mettagrid_6c_grid_Environment},
- {Py_tp_methods, (void *)__pyx_methods_9mettagrid_6c_grid_Environment},
- {Py_tp_init, (void *)__pyx_pw_9mettagrid_6c_grid_11Environment_1__init__},
- {Py_tp_new, (void *)__pyx_tp_new_9mettagrid_6c_grid_Environment},
+static PyType_Slot __pyx_type_3env_9mettagrid_6c_grid_Environment_slots[] = {
+ {Py_tp_dealloc, (void *)__pyx_tp_dealloc_3env_9mettagrid_6c_grid_Environment},
+ {Py_tp_methods, (void *)__pyx_methods_3env_9mettagrid_6c_grid_Environment},
+ {Py_tp_init, (void *)__pyx_pw_3env_9mettagrid_6c_grid_11Environment_1__init__},
+ {Py_tp_new, (void *)__pyx_tp_new_3env_9mettagrid_6c_grid_Environment},
{0, 0},
};
-static PyType_Spec __pyx_type_9mettagrid_6c_grid_Environment_spec = {
- "mettagrid.c_grid.Environment",
- sizeof(struct __pyx_obj_9mettagrid_6c_grid_Environment),
+static PyType_Spec __pyx_type_3env_9mettagrid_6c_grid_Environment_spec = {
+ "env.mettagrid.c_grid.Environment",
+ sizeof(struct __pyx_obj_3env_9mettagrid_6c_grid_Environment),
0,
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
- __pyx_type_9mettagrid_6c_grid_Environment_slots,
+ __pyx_type_3env_9mettagrid_6c_grid_Environment_slots,
};
#else
-static PyTypeObject __pyx_type_9mettagrid_6c_grid_Environment = {
+static PyTypeObject __pyx_type_3env_9mettagrid_6c_grid_Environment = {
PyVarObject_HEAD_INIT(0, 0)
- "mettagrid.c_grid.""Environment", /*tp_name*/
- sizeof(struct __pyx_obj_9mettagrid_6c_grid_Environment), /*tp_basicsize*/
+ "env.mettagrid.c_grid.""Environment", /*tp_name*/
+ sizeof(struct __pyx_obj_3env_9mettagrid_6c_grid_Environment), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_9mettagrid_6c_grid_Environment, /*tp_dealloc*/
+ __pyx_tp_dealloc_3env_9mettagrid_6c_grid_Environment, /*tp_dealloc*/
#if PY_VERSION_HEX < 0x030800b4
0, /*tp_print*/
#endif
@@ -20178,7 +20199,7 @@ static PyTypeObject __pyx_type_9mettagrid_6c_grid_Environment = {
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_9mettagrid_6c_grid_Environment, /*tp_methods*/
+ __pyx_methods_3env_9mettagrid_6c_grid_Environment, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
@@ -20188,9 +20209,9 @@ static PyTypeObject __pyx_type_9mettagrid_6c_grid_Environment = {
#if !CYTHON_USE_TYPE_SPECS
0, /*tp_dictoffset*/
#endif
- __pyx_pw_9mettagrid_6c_grid_11Environment_1__init__, /*tp_init*/
+ __pyx_pw_3env_9mettagrid_6c_grid_11Environment_1__init__, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_9mettagrid_6c_grid_Environment, /*tp_new*/
+ __pyx_tp_new_3env_9mettagrid_6c_grid_Environment, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
@@ -20359,7 +20380,7 @@ static PyType_Slot __pyx_type___pyx_array_slots[] = {
{0, 0},
};
static PyType_Spec __pyx_type___pyx_array_spec = {
- "mettagrid.c_grid.array",
+ "env.mettagrid.c_grid.array",
sizeof(struct __pyx_array_obj),
0,
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_SEQUENCE,
@@ -20405,7 +20426,7 @@ static PyBufferProcs __pyx_tp_as_buffer_array = {
static PyTypeObject __pyx_type___pyx_array = {
PyVarObject_HEAD_INIT(0, 0)
- "mettagrid.c_grid.""array", /*tp_name*/
+ "env.mettagrid.c_grid.""array", /*tp_name*/
sizeof(struct __pyx_array_obj), /*tp_basicsize*/
0, /*tp_itemsize*/
__pyx_tp_dealloc_array, /*tp_dealloc*/
@@ -20565,7 +20586,7 @@ static PyType_Slot __pyx_type___pyx_MemviewEnum_slots[] = {
{0, 0},
};
static PyType_Spec __pyx_type___pyx_MemviewEnum_spec = {
- "mettagrid.c_grid.Enum",
+ "env.mettagrid.c_grid.Enum",
sizeof(struct __pyx_MemviewEnum_obj),
0,
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
@@ -20575,7 +20596,7 @@ static PyType_Spec __pyx_type___pyx_MemviewEnum_spec = {
static PyTypeObject __pyx_type___pyx_MemviewEnum = {
PyVarObject_HEAD_INIT(0, 0)
- "mettagrid.c_grid.""Enum", /*tp_name*/
+ "env.mettagrid.c_grid.""Enum", /*tp_name*/
sizeof(struct __pyx_MemviewEnum_obj), /*tp_basicsize*/
0, /*tp_itemsize*/
__pyx_tp_dealloc_Enum, /*tp_dealloc*/
@@ -20872,7 +20893,7 @@ static PyType_Slot __pyx_type___pyx_memoryview_slots[] = {
{0, 0},
};
static PyType_Spec __pyx_type___pyx_memoryview_spec = {
- "mettagrid.c_grid.memoryview",
+ "env.mettagrid.c_grid.memoryview",
sizeof(struct __pyx_memoryview_obj),
0,
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
@@ -20918,7 +20939,7 @@ static PyBufferProcs __pyx_tp_as_buffer_memoryview = {
static PyTypeObject __pyx_type___pyx_memoryview = {
PyVarObject_HEAD_INIT(0, 0)
- "mettagrid.c_grid.""memoryview", /*tp_name*/
+ "env.mettagrid.c_grid.""memoryview", /*tp_name*/
sizeof(struct __pyx_memoryview_obj), /*tp_basicsize*/
0, /*tp_itemsize*/
__pyx_tp_dealloc_memoryview, /*tp_dealloc*/
@@ -21070,7 +21091,7 @@ static PyType_Slot __pyx_type___pyx_memoryviewslice_slots[] = {
{0, 0},
};
static PyType_Spec __pyx_type___pyx_memoryviewslice_spec = {
- "mettagrid.c_grid._memoryviewslice",
+ "env.mettagrid.c_grid._memoryviewslice",
sizeof(struct __pyx_memoryviewslice_obj),
0,
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_SEQUENCE,
@@ -21080,7 +21101,7 @@ static PyType_Spec __pyx_type___pyx_memoryviewslice_spec = {
static PyTypeObject __pyx_type___pyx_memoryviewslice = {
PyVarObject_HEAD_INIT(0, 0)
- "mettagrid.c_grid.""_memoryviewslice", /*tp_name*/
+ "env.mettagrid.c_grid.""_memoryviewslice", /*tp_name*/
sizeof(struct __pyx_memoryviewslice_obj), /*tp_basicsize*/
0, /*tp_itemsize*/
__pyx_tp_dealloc__memoryviewslice, /*tp_dealloc*/
@@ -21257,6 +21278,7 @@ static int __Pyx_CreateStringTabAndInitStrings(void) {
{&__pyx_kp_u_enable, __pyx_k_enable, sizeof(__pyx_k_enable), 0, 1, 0, 0},
{&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1},
{&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1},
+ {&__pyx_n_s_env_mettagrid_c_grid, __pyx_k_env_mettagrid_c_grid, sizeof(__pyx_k_env_mettagrid_c_grid), 0, 0, 1, 1},
{&__pyx_kp_s_env_mettagrid_c_grid_pyx, __pyx_k_env_mettagrid_c_grid_pyx, sizeof(__pyx_k_env_mettagrid_c_grid_pyx), 0, 0, 1, 0},
{&__pyx_n_s_error, __pyx_k_error, sizeof(__pyx_k_error), 0, 0, 1, 1},
{&__pyx_n_s_flags, __pyx_k_flags, sizeof(__pyx_k_flags), 0, 0, 1, 1},
@@ -21281,7 +21303,6 @@ static int __Pyx_CreateStringTabAndInitStrings(void) {
{&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
{&__pyx_n_s_map_size, __pyx_k_map_size, sizeof(__pyx_k_map_size), 0, 0, 1, 1},
{&__pyx_n_s_memview, __pyx_k_memview, sizeof(__pyx_k_memview), 0, 0, 1, 1},
- {&__pyx_n_s_mettagrid_c_grid, __pyx_k_mettagrid_c_grid, sizeof(__pyx_k_mettagrid_c_grid), 0, 0, 1, 1},
{&__pyx_n_s_mode, __pyx_k_mode, sizeof(__pyx_k_mode), 0, 0, 1, 1},
{&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
{&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1},
@@ -21503,7 +21524,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
__Pyx_GIVEREF(__pyx_tuple__19);
__pyx_codeobj__20 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__19, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Enum, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__20)) __PYX_ERR(1, 1, __pyx_L1_error)
- /* "mettagrid/c_grid.pyx":56
+ /* "env/mettagrid/c_grid.pyx":56
* ]
*
* def reset(self, observations, seed=0): # <<<<<<<<<<<<<<
@@ -21518,7 +21539,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_tuple__23);
__Pyx_GIVEREF(__pyx_tuple__23);
- /* "mettagrid/c_grid.pyx":83
+ /* "env/mettagrid/c_grid.pyx":83
* self._compute_observations()
*
* def step(self, np_actions): # <<<<<<<<<<<<<<
@@ -21641,34 +21662,34 @@ static int __Pyx_modinit_type_init_code(void) {
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
/*--- Type init code ---*/
- __pyx_vtabptr_9mettagrid_6c_grid_Environment = &__pyx_vtable_9mettagrid_6c_grid_Environment;
- __pyx_vtable_9mettagrid_6c_grid_Environment._compute_observations = (void (*)(struct __pyx_obj_9mettagrid_6c_grid_Environment *))__pyx_f_9mettagrid_6c_grid_11Environment__compute_observations;
+ __pyx_vtabptr_3env_9mettagrid_6c_grid_Environment = &__pyx_vtable_3env_9mettagrid_6c_grid_Environment;
+ __pyx_vtable_3env_9mettagrid_6c_grid_Environment._compute_observations = (void (*)(struct __pyx_obj_3env_9mettagrid_6c_grid_Environment *))__pyx_f_3env_9mettagrid_6c_grid_11Environment__compute_observations;
#if CYTHON_USE_TYPE_SPECS
- __pyx_ptype_9mettagrid_6c_grid_Environment = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9mettagrid_6c_grid_Environment_spec, NULL); if (unlikely(!__pyx_ptype_9mettagrid_6c_grid_Environment)) __PYX_ERR(0, 20, __pyx_L1_error)
- if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9mettagrid_6c_grid_Environment_spec, __pyx_ptype_9mettagrid_6c_grid_Environment) < 0) __PYX_ERR(0, 20, __pyx_L1_error)
+ __pyx_ptype_3env_9mettagrid_6c_grid_Environment = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_3env_9mettagrid_6c_grid_Environment_spec, NULL); if (unlikely(!__pyx_ptype_3env_9mettagrid_6c_grid_Environment)) __PYX_ERR(0, 20, __pyx_L1_error)
+ if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_3env_9mettagrid_6c_grid_Environment_spec, __pyx_ptype_3env_9mettagrid_6c_grid_Environment) < 0) __PYX_ERR(0, 20, __pyx_L1_error)
#else
- __pyx_ptype_9mettagrid_6c_grid_Environment = &__pyx_type_9mettagrid_6c_grid_Environment;
+ __pyx_ptype_3env_9mettagrid_6c_grid_Environment = &__pyx_type_3env_9mettagrid_6c_grid_Environment;
#endif
#if !CYTHON_COMPILING_IN_LIMITED_API
#endif
#if !CYTHON_USE_TYPE_SPECS
- if (__Pyx_PyType_Ready(__pyx_ptype_9mettagrid_6c_grid_Environment) < 0) __PYX_ERR(0, 20, __pyx_L1_error)
+ if (__Pyx_PyType_Ready(__pyx_ptype_3env_9mettagrid_6c_grid_Environment) < 0) __PYX_ERR(0, 20, __pyx_L1_error)
#endif
#if PY_MAJOR_VERSION < 3
- __pyx_ptype_9mettagrid_6c_grid_Environment->tp_print = 0;
+ __pyx_ptype_3env_9mettagrid_6c_grid_Environment->tp_print = 0;
#endif
#if !CYTHON_COMPILING_IN_LIMITED_API
- if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_9mettagrid_6c_grid_Environment->tp_dictoffset && __pyx_ptype_9mettagrid_6c_grid_Environment->tp_getattro == PyObject_GenericGetAttr)) {
- __pyx_ptype_9mettagrid_6c_grid_Environment->tp_getattro = __Pyx_PyObject_GenericGetAttr;
+ if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_3env_9mettagrid_6c_grid_Environment->tp_dictoffset && __pyx_ptype_3env_9mettagrid_6c_grid_Environment->tp_getattro == PyObject_GenericGetAttr)) {
+ __pyx_ptype_3env_9mettagrid_6c_grid_Environment->tp_getattro = __Pyx_PyObject_GenericGetAttr;
}
#endif
- if (__Pyx_SetVtable(__pyx_ptype_9mettagrid_6c_grid_Environment, __pyx_vtabptr_9mettagrid_6c_grid_Environment) < 0) __PYX_ERR(0, 20, __pyx_L1_error)
+ if (__Pyx_SetVtable(__pyx_ptype_3env_9mettagrid_6c_grid_Environment, __pyx_vtabptr_3env_9mettagrid_6c_grid_Environment) < 0) __PYX_ERR(0, 20, __pyx_L1_error)
#if !CYTHON_COMPILING_IN_LIMITED_API
- if (__Pyx_MergeVtables(__pyx_ptype_9mettagrid_6c_grid_Environment) < 0) __PYX_ERR(0, 20, __pyx_L1_error)
+ if (__Pyx_MergeVtables(__pyx_ptype_3env_9mettagrid_6c_grid_Environment) < 0) __PYX_ERR(0, 20, __pyx_L1_error)
#endif
- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Environment, (PyObject *) __pyx_ptype_9mettagrid_6c_grid_Environment) < 0) __PYX_ERR(0, 20, __pyx_L1_error)
+ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Environment, (PyObject *) __pyx_ptype_3env_9mettagrid_6c_grid_Environment) < 0) __PYX_ERR(0, 20, __pyx_L1_error)
#if !CYTHON_COMPILING_IN_LIMITED_API
- if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_9mettagrid_6c_grid_Environment) < 0) __PYX_ERR(0, 20, __pyx_L1_error)
+ if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_3env_9mettagrid_6c_grid_Environment) < 0) __PYX_ERR(0, 20, __pyx_L1_error)
#endif
__pyx_vtabptr_array = &__pyx_vtable_array;
__pyx_vtable_array.get_memview = (PyObject *(*)(struct __pyx_array_obj *))__pyx_array_get_memview;
@@ -22098,14 +22119,14 @@ if (!__Pyx_RefNanny) {
#if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
#endif
- if (__pyx_module_is_main_mettagrid__c_grid) {
+ if (__pyx_module_is_main_env__mettagrid__c_grid) {
if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name_2, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
}
#if PY_MAJOR_VERSION >= 3
{
PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
- if (!PyDict_GetItemString(modules, "mettagrid.c_grid")) {
- if (unlikely((PyDict_SetItemString(modules, "mettagrid.c_grid", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
+ if (!PyDict_GetItemString(modules, "env.mettagrid.c_grid")) {
+ if (unlikely((PyDict_SetItemString(modules, "env.mettagrid.c_grid", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
}
}
#endif
@@ -22639,115 +22660,115 @@ if (!__Pyx_RefNanny) {
if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Enum, __pyx_t_7) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- /* "mettagrid/c_grid.pyx":10
+ /* "env/mettagrid/c_grid.pyx":10
*
* cdef:
* int EMPTY = 0 # <<<<<<<<<<<<<<
* int AGENT = 1
* int WALL = 2
*/
- __pyx_v_9mettagrid_6c_grid_EMPTY = 0;
+ __pyx_v_3env_9mettagrid_6c_grid_EMPTY = 0;
- /* "mettagrid/c_grid.pyx":11
+ /* "env/mettagrid/c_grid.pyx":11
* cdef:
* int EMPTY = 0
* int AGENT = 1 # <<<<<<<<<<<<<<
* int WALL = 2
*
*/
- __pyx_v_9mettagrid_6c_grid_AGENT = 1;
+ __pyx_v_3env_9mettagrid_6c_grid_AGENT = 1;
- /* "mettagrid/c_grid.pyx":12
+ /* "env/mettagrid/c_grid.pyx":12
* int EMPTY = 0
* int AGENT = 1
* int WALL = 2 # <<<<<<<<<<<<<<
*
* int PASS = 0
*/
- __pyx_v_9mettagrid_6c_grid_WALL = 2;
+ __pyx_v_3env_9mettagrid_6c_grid_WALL = 2;
- /* "mettagrid/c_grid.pyx":14
+ /* "env/mettagrid/c_grid.pyx":14
* int WALL = 2
*
* int PASS = 0 # <<<<<<<<<<<<<<
* int NORTH = 1
* int SOUTH = 2
*/
- __pyx_v_9mettagrid_6c_grid_PASS = 0;
+ __pyx_v_3env_9mettagrid_6c_grid_PASS = 0;
- /* "mettagrid/c_grid.pyx":15
+ /* "env/mettagrid/c_grid.pyx":15
*
* int PASS = 0
* int NORTH = 1 # <<<<<<<<<<<<<<
* int SOUTH = 2
* int EAST = 3
*/
- __pyx_v_9mettagrid_6c_grid_NORTH = 1;
+ __pyx_v_3env_9mettagrid_6c_grid_NORTH = 1;
- /* "mettagrid/c_grid.pyx":16
+ /* "env/mettagrid/c_grid.pyx":16
* int PASS = 0
* int NORTH = 1
* int SOUTH = 2 # <<<<<<<<<<<<<<
* int EAST = 3
* int WEST = 4
*/
- __pyx_v_9mettagrid_6c_grid_SOUTH = 2;
+ __pyx_v_3env_9mettagrid_6c_grid_SOUTH = 2;
- /* "mettagrid/c_grid.pyx":17
+ /* "env/mettagrid/c_grid.pyx":17
* int NORTH = 1
* int SOUTH = 2
* int EAST = 3 # <<<<<<<<<<<<<<
* int WEST = 4
*
*/
- __pyx_v_9mettagrid_6c_grid_EAST = 3;
+ __pyx_v_3env_9mettagrid_6c_grid_EAST = 3;
- /* "mettagrid/c_grid.pyx":18
+ /* "env/mettagrid/c_grid.pyx":18
* int SOUTH = 2
* int EAST = 3
* int WEST = 4 # <<<<<<<<<<<<<<
*
* cdef class Environment:
*/
- __pyx_v_9mettagrid_6c_grid_WEST = 4;
+ __pyx_v_3env_9mettagrid_6c_grid_WEST = 4;
- /* "mettagrid/c_grid.pyx":56
+ /* "env/mettagrid/c_grid.pyx":56
* ]
*
* def reset(self, observations, seed=0): # <<<<<<<<<<<<<<
* self.observations = observations
*
*/
- __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_9mettagrid_6c_grid_11Environment_3reset, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Environment_reset, NULL, __pyx_n_s_mettagrid_c_grid, __pyx_d, ((PyObject *)__pyx_codeobj__22)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 56, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_3env_9mettagrid_6c_grid_11Environment_3reset, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Environment_reset, NULL, __pyx_n_s_env_mettagrid_c_grid, __pyx_d, ((PyObject *)__pyx_codeobj__22)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 56, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_tuple__23);
- if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_9mettagrid_6c_grid_Environment, __pyx_n_s_reset, __pyx_t_7) < 0) __PYX_ERR(0, 56, __pyx_L1_error)
+ if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_3env_9mettagrid_6c_grid_Environment, __pyx_n_s_reset, __pyx_t_7) < 0) __PYX_ERR(0, 56, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- PyType_Modified(__pyx_ptype_9mettagrid_6c_grid_Environment);
+ PyType_Modified(__pyx_ptype_3env_9mettagrid_6c_grid_Environment);
- /* "mettagrid/c_grid.pyx":83
+ /* "env/mettagrid/c_grid.pyx":83
* self._compute_observations()
*
* def step(self, np_actions): # <<<<<<<<<<<<<<
* cdef unsigned int[:] actions = np_actions
* cdef int agent_idx, atn, r, c, dr, dc, dest_r, dest_c
*/
- __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_9mettagrid_6c_grid_11Environment_5step, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Environment_step, NULL, __pyx_n_s_mettagrid_c_grid, __pyx_d, ((PyObject *)__pyx_codeobj__25)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 83, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_3env_9mettagrid_6c_grid_11Environment_5step, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Environment_step, NULL, __pyx_n_s_env_mettagrid_c_grid, __pyx_d, ((PyObject *)__pyx_codeobj__25)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 83, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
- if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_9mettagrid_6c_grid_Environment, __pyx_n_s_step, __pyx_t_7) < 0) __PYX_ERR(0, 83, __pyx_L1_error)
+ if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_3env_9mettagrid_6c_grid_Environment, __pyx_n_s_step, __pyx_t_7) < 0) __PYX_ERR(0, 83, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- PyType_Modified(__pyx_ptype_9mettagrid_6c_grid_Environment);
+ PyType_Modified(__pyx_ptype_3env_9mettagrid_6c_grid_Environment);
/* "(tree fragment)":1
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
* cdef tuple state
* cdef object _dict
*/
- __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_9mettagrid_6c_grid_11Environment_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Environment___reduce_cython, NULL, __pyx_n_s_mettagrid_c_grid, __pyx_d, ((PyObject *)__pyx_codeobj__27)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_3env_9mettagrid_6c_grid_11Environment_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Environment___reduce_cython, NULL, __pyx_n_s_env_mettagrid_c_grid, __pyx_d, ((PyObject *)__pyx_codeobj__27)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
- if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_9mettagrid_6c_grid_Environment, __pyx_n_s_reduce_cython, __pyx_t_7) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
+ if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_3env_9mettagrid_6c_grid_Environment, __pyx_n_s_reduce_cython, __pyx_t_7) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- PyType_Modified(__pyx_ptype_9mettagrid_6c_grid_Environment);
+ PyType_Modified(__pyx_ptype_3env_9mettagrid_6c_grid_Environment);
/* "(tree fragment)":16
* else:
@@ -22755,23 +22776,23 @@ if (!__Pyx_RefNanny) {
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
* __pyx_unpickle_Environment__set_state(self, __pyx_state)
*/
- __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_9mettagrid_6c_grid_11Environment_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Environment___setstate_cython, NULL, __pyx_n_s_mettagrid_c_grid, __pyx_d, ((PyObject *)__pyx_codeobj__29)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 16, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_3env_9mettagrid_6c_grid_11Environment_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Environment___setstate_cython, NULL, __pyx_n_s_env_mettagrid_c_grid, __pyx_d, ((PyObject *)__pyx_codeobj__29)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 16, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
- if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_9mettagrid_6c_grid_Environment, __pyx_n_s_setstate_cython, __pyx_t_7) < 0) __PYX_ERR(1, 16, __pyx_L1_error)
+ if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_3env_9mettagrid_6c_grid_Environment, __pyx_n_s_setstate_cython, __pyx_t_7) < 0) __PYX_ERR(1, 16, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- PyType_Modified(__pyx_ptype_9mettagrid_6c_grid_Environment);
+ PyType_Modified(__pyx_ptype_3env_9mettagrid_6c_grid_Environment);
/* "(tree fragment)":1
* def __pyx_unpickle_Environment(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
* cdef object __pyx_PickleError
* cdef object __pyx_result
*/
- __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_9mettagrid_6c_grid_1__pyx_unpickle_Environment, 0, __pyx_n_s_pyx_unpickle_Environment, NULL, __pyx_n_s_mettagrid_c_grid, __pyx_d, ((PyObject *)__pyx_codeobj__30)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_3env_9mettagrid_6c_grid_1__pyx_unpickle_Environment, 0, __pyx_n_s_pyx_unpickle_Environment, NULL, __pyx_n_s_env_mettagrid_c_grid, __pyx_d, ((PyObject *)__pyx_codeobj__30)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Environment, __pyx_t_7) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- /* "mettagrid/c_grid.pyx":1
+ /* "env/mettagrid/c_grid.pyx":1
* # distutils: define_macros=NPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION # <<<<<<<<<<<<<<
* # cython: language_level=3
* # cython: boundscheck=False
@@ -22790,7 +22811,7 @@ if (!__Pyx_RefNanny) {
__Pyx_XDECREF(__pyx_t_7);
if (__pyx_m) {
if (__pyx_d && stringtab_initialized) {
- __Pyx_AddTraceback("init mettagrid.c_grid", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("init env.mettagrid.c_grid", __pyx_clineno, __pyx_lineno, __pyx_filename);
}
#if !CYTHON_USE_MODULE_STATE
Py_CLEAR(__pyx_m);
@@ -22804,7 +22825,7 @@ if (!__Pyx_RefNanny) {
}
#endif
} else if (!PyErr_Occurred()) {
- PyErr_SetString(PyExc_ImportError, "init mettagrid.c_grid");
+ PyErr_SetString(PyExc_ImportError, "init env.mettagrid.c_grid");
}
__pyx_L0:;
__Pyx_RefNannyFinishContext();
@@ -26870,7 +26891,7 @@ static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func,
default:
return NULL;
}
- return ((_PyCFunctionFastWithKeywords)(void(*)(void))def->ml_meth)(self, args, nargs, kwnames);
+ return ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))def->ml_meth)(self, args, nargs, kwnames);
}
static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
{
diff --git a/env/mettagrid/c_grid.html b/env/mettagrid/c_grid.html
index 3109ca6..61c19ce 100644
--- a/env/mettagrid/c_grid.html
+++ b/env/mettagrid/c_grid.html
@@ -1,5 +1,5 @@
<!DOCTYPE html>
-<!-- Generated by Cython 3.0.8 -->
+<!-- Generated by Cython 3.0.10 -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
@@ -305,7 +305,6 @@ span.linenos.special { color: #000000; background-color: #ffffc0; padding-left:
.cython .cs { color: #3D7B7B; font-style: italic } /* Comment.Special */
.cython .gd { color: #A00000 } /* Generic.Deleted */
.cython .ge { font-style: italic } /* Generic.Emph */
-.cython .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */
.cython .gr { color: #E40000 } /* Generic.Error */
.cython .gh { color: #000080; font-weight: bold } /* Generic.Heading */
.cython .gi { color: #008400 } /* Generic.Inserted */
@@ -364,7 +363,7 @@ span.linenos.special { color: #000000; background-color: #ffffc0; padding-left:
</style>
</head>
<body class="cython">
-<p><span style="border-bottom: solid 1px grey;">Generated by Cython 3.0.8</span></p>
+<p><span style="border-bottom: solid 1px grey;">Generated by Cython 3.0.10</span></p>
<p>
<span style="background-color: #FFFF00">Yellow lines</span> hint at Python interaction.<br />
Click on a line that starts with a "<code>+</code>" to see the C code that Cython generated for it.
@@ -384,27 +383,27 @@ span.linenos.special { color: #000000; background-color: #ffffc0; padding-left:
<pre class="cython line score-0"> <span class="">008</span>: </pre>
<pre class="cython line score-0"> <span class="">009</span>: <span class="k">cdef</span><span class="p">:</span></pre>
<pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">010</span>: <span class="nb">int</span> <span class="n">EMPTY</span> <span class="o">=</span> <span class="mf">0</span></pre>
-<pre class='cython code score-0 '> __pyx_v_9mettagrid_6c_grid_EMPTY = 0;
+<pre class='cython code score-0 '> __pyx_v_3env_9mettagrid_6c_grid_EMPTY = 0;
</pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">011</span>: <span class="nb">int</span> <span class="n">AGENT</span> <span class="o">=</span> <span class="mf">1</span></pre>
-<pre class='cython code score-0 '> __pyx_v_9mettagrid_6c_grid_AGENT = 1;
+<pre class='cython code score-0 '> __pyx_v_3env_9mettagrid_6c_grid_AGENT = 1;
</pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">012</span>: <span class="nb">int</span> <span class="n">WALL</span> <span class="o">=</span> <span class="mf">2</span></pre>
-<pre class='cython code score-0 '> __pyx_v_9mettagrid_6c_grid_WALL = 2;
+<pre class='cython code score-0 '> __pyx_v_3env_9mettagrid_6c_grid_WALL = 2;
</pre><pre class="cython line score-0"> <span class="">013</span>: </pre>
<pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">014</span>: <span class="nb">int</span> <span class="n">PASS</span> <span class="o">=</span> <span class="mf">0</span></pre>
-<pre class='cython code score-0 '> __pyx_v_9mettagrid_6c_grid_PASS = 0;
+<pre class='cython code score-0 '> __pyx_v_3env_9mettagrid_6c_grid_PASS = 0;
</pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">015</span>: <span class="nb">int</span> <span class="n">NORTH</span> <span class="o">=</span> <span class="mf">1</span></pre>
-<pre class='cython code score-0 '> __pyx_v_9mettagrid_6c_grid_NORTH = 1;
+<pre class='cython code score-0 '> __pyx_v_3env_9mettagrid_6c_grid_NORTH = 1;
</pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">016</span>: <span class="nb">int</span> <span class="n">SOUTH</span> <span class="o">=</span> <span class="mf">2</span></pre>
-<pre class='cython code score-0 '> __pyx_v_9mettagrid_6c_grid_SOUTH = 2;
+<pre class='cython code score-0 '> __pyx_v_3env_9mettagrid_6c_grid_SOUTH = 2;
</pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">017</span>: <span class="nb">int</span> <span class="n">EAST</span> <span class="o">=</span> <span class="mf">3</span></pre>
-<pre class='cython code score-0 '> __pyx_v_9mettagrid_6c_grid_EAST = 3;
+<pre class='cython code score-0 '> __pyx_v_3env_9mettagrid_6c_grid_EAST = 3;
</pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">018</span>: <span class="nb">int</span> <span class="n">WEST</span> <span class="o">=</span> <span class="mf">4</span></pre>
-<pre class='cython code score-0 '> __pyx_v_9mettagrid_6c_grid_WEST = 4;
+<pre class='cython code score-0 '> __pyx_v_3env_9mettagrid_6c_grid_WEST = 4;
</pre><pre class="cython line score-0"> <span class="">019</span>: </pre>
<pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">020</span>: <span class="k">cdef</span> <span class="k">class</span> <span class="nf">Environment</span><span class="p">:</span></pre>
-<pre class='cython code score-0 '>struct __pyx_obj_9mettagrid_6c_grid_Environment {
+<pre class='cython code score-0 '>struct __pyx_obj_3env_9mettagrid_6c_grid_Environment {
PyObject_HEAD
- struct __pyx_vtabstruct_9mettagrid_6c_grid_Environment *__pyx_vtab;
+ struct __pyx_vtabstruct_3env_9mettagrid_6c_grid_Environment *__pyx_vtab;
int map_size;
int num_agents;
int horizon;
@@ -416,10 +415,10 @@ span.linenos.special { color: #000000; background-color: #ffffc0; padding-left:
__Pyx_memviewslice spawn_position_cands;
};
/* … */
-struct __pyx_vtabstruct_9mettagrid_6c_grid_Environment {
- void (*_compute_observations)(struct __pyx_obj_9mettagrid_6c_grid_Environment *);
+struct __pyx_vtabstruct_3env_9mettagrid_6c_grid_Environment {
+ void (*_compute_observations)(struct __pyx_obj_3env_9mettagrid_6c_grid_Environment *);
};
-static struct __pyx_vtabstruct_9mettagrid_6c_grid_Environment *__pyx_vtabptr_9mettagrid_6c_grid_Environment;
+static struct __pyx_vtabstruct_3env_9mettagrid_6c_grid_Environment *__pyx_vtabptr_3env_9mettagrid_6c_grid_Environment;
</pre><pre class="cython line score-0"> <span class="">021</span>: <span class="k">cdef</span><span class="p">:</span></pre>
<pre class="cython line score-0"> <span class="">022</span>: <span class="nb">int</span> <span class="n">map_size</span></pre>
@@ -435,8 +434,8 @@ static struct __pyx_vtabstruct_9mettagrid_6c_grid_Environment *__pyx_vtabptr_9me
<pre class="cython line score-0"> <span class="">032</span>: </pre>
<pre class="cython line score-168" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">033</span>: <span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">grid</span><span class="p">,</span> <span class="n">agent_positions</span><span class="p">,</span> <span class="n">spawn_position_cands</span><span class="p">,</span> <span class="n">observations</span><span class="p">,</span></pre>
<pre class='cython code score-168 '>/* Python wrapper */
-static int __pyx_pw_9mettagrid_6c_grid_11Environment_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static int __pyx_pw_9mettagrid_6c_grid_11Environment_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static int __pyx_pw_3env_9mettagrid_6c_grid_11Environment_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_3env_9mettagrid_6c_grid_11Environment_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_grid = 0;
PyObject *__pyx_v_agent_positions = 0;
PyObject *__pyx_v_spawn_position_cands = 0;
@@ -598,11 +597,11 @@ static int __pyx_pw_9mettagrid_6c_grid_11Environment_1__init__(PyObject *__pyx_v
<span class='pyx_c_api'>__Pyx_Arg_XDECREF_VARARGS</span>(values[__pyx_temp]);
}
}
- <span class='pyx_c_api'>__Pyx_AddTraceback</span>("mettagrid.c_grid.Environment.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ <span class='pyx_c_api'>__Pyx_AddTraceback</span>("env.mettagrid.c_grid.Environment.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
return -1;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_9mettagrid_6c_grid_11Environment___init__(((struct __pyx_obj_9mettagrid_6c_grid_Environment *)__pyx_v_self), __pyx_v_grid, __pyx_v_agent_positions, __pyx_v_spawn_position_cands, __pyx_v_observations, __pyx_v_map_size, __pyx_v_num_agents, __pyx_v_horizon, __pyx_v_vision_range);
+ __pyx_r = __pyx_pf_3env_9mettagrid_6c_grid_11Environment___init__(((struct __pyx_obj_3env_9mettagrid_6c_grid_Environment *)__pyx_v_self), __pyx_v_grid, __pyx_v_agent_positions, __pyx_v_spawn_position_cands, __pyx_v_observations, __pyx_v_map_size, __pyx_v_num_agents, __pyx_v_horizon, __pyx_v_vision_range);
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
@@ -618,7 +617,7 @@ static int __pyx_pw_9mettagrid_6c_grid_11Environment_1__init__(PyObject *__pyx_v
return __pyx_r;
}
-static int __pyx_pf_9mettagrid_6c_grid_11Environment___init__(struct __pyx_obj_9mettagrid_6c_grid_Environment *__pyx_v_self, PyObject *__pyx_v_grid, PyObject *__pyx_v_agent_positions, PyObject *__pyx_v_spawn_position_cands, PyObject *__pyx_v_observations, int __pyx_v_map_size, int __pyx_v_num_agents, int __pyx_v_horizon, int __pyx_v_vision_range) {
+static int __pyx_pf_3env_9mettagrid_6c_grid_11Environment___init__(struct __pyx_obj_3env_9mettagrid_6c_grid_Environment *__pyx_v_self, PyObject *__pyx_v_grid, PyObject *__pyx_v_agent_positions, PyObject *__pyx_v_spawn_position_cands, PyObject *__pyx_v_observations, int __pyx_v_map_size, int __pyx_v_num_agents, int __pyx_v_horizon, int __pyx_v_vision_range) {
int __pyx_r;
/* … */
/* function exit code */
@@ -628,7 +627,7 @@ static int __pyx_pf_9mettagrid_6c_grid_11Environment___init__(struct __pyx_obj_9
__PYX_XCLEAR_MEMVIEW(&__pyx_t_1, 1);
__PYX_XCLEAR_MEMVIEW(&__pyx_t_2, 1);
__PYX_XCLEAR_MEMVIEW(&__pyx_t_3, 1);
- <span class='pyx_c_api'>__Pyx_AddTraceback</span>("mettagrid.c_grid.Environment.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ <span class='pyx_c_api'>__Pyx_AddTraceback</span>("env.mettagrid.c_grid.Environment.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
return __pyx_r;
@@ -671,7 +670,7 @@ static int __pyx_pf_9mettagrid_6c_grid_11Environment___init__(struct __pyx_obj_9
__pyx_t_3.data = NULL;
</pre><pre class="cython line score-0"> <span class="">045</span>: </pre>
<pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">046</span>: <span class="k">cdef</span> <span class="kt">void</span> <span class="nf">_compute_observations</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span></pre>
-<pre class='cython code score-2 '>static void __pyx_f_9mettagrid_6c_grid_11Environment__compute_observations(struct __pyx_obj_9mettagrid_6c_grid_Environment *__pyx_v_self) {
+<pre class='cython code score-2 '>static void __pyx_f_3env_9mettagrid_6c_grid_11Environment__compute_observations(struct __pyx_obj_3env_9mettagrid_6c_grid_Environment *__pyx_v_self) {
int __pyx_v_r;
int __pyx_v_c;
int __pyx_v_agent_idx;
@@ -681,7 +680,7 @@ static int __pyx_pf_9mettagrid_6c_grid_11Environment___init__(struct __pyx_obj_9
__pyx_L1_error:;
__PYX_XCLEAR_MEMVIEW(&__pyx_t_6, 1);
__PYX_XCLEAR_MEMVIEW(&__pyx_t_8, 1);
- <span class='pyx_c_api'>__Pyx_AddTraceback</span>("mettagrid.c_grid.Environment._compute_observations", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ <span class='pyx_c_api'>__Pyx_AddTraceback</span>("env.mettagrid.c_grid.Environment._compute_observations", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_L0:;
}
</pre><pre class="cython line score-0"> <span class="">047</span>: <span class="k">cdef</span> <span class="kt">int</span> <span class="nf">r</span><span class="p">,</span> <span class="nf">c</span><span class="p">,</span> <span class="nf">agent_idx</span></pre>
@@ -766,15 +765,15 @@ if (unlikely((__pyx_memoryview_copy_contents(__pyx_t_6, __pyx_t_8, 2, 2, 0) <
<pre class="cython line score-0"> <span class="">055</span>: </pre>
<pre class="cython line score-75" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">056</span>: <span class="k">def</span> <span class="nf">reset</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">observations</span><span class="p">,</span> <span class="n">seed</span><span class="o">=</span><span class="mf">0</span><span class="p">):</span></pre>
<pre class='cython code score-75 '>/* Python wrapper */
-static PyObject *__pyx_pw_9mettagrid_6c_grid_11Environment_3reset(PyObject *__pyx_v_self,
+static PyObject *__pyx_pw_3env_9mettagrid_6c_grid_11Environment_3reset(PyObject *__pyx_v_self,
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
-static PyMethodDef __pyx_mdef_9mettagrid_6c_grid_11Environment_3reset = {"reset", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9mettagrid_6c_grid_11Environment_3reset, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
-static PyObject *__pyx_pw_9mettagrid_6c_grid_11Environment_3reset(PyObject *__pyx_v_self,
+static PyMethodDef __pyx_mdef_3env_9mettagrid_6c_grid_11Environment_3reset = {"reset", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_3env_9mettagrid_6c_grid_11Environment_3reset, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_3env_9mettagrid_6c_grid_11Environment_3reset(PyObject *__pyx_v_self,
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
@@ -857,11 +856,11 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
<span class='pyx_c_api'>__Pyx_Arg_XDECREF_FASTCALL</span>(values[__pyx_temp]);
}
}
- <span class='pyx_c_api'>__Pyx_AddTraceback</span>("mettagrid.c_grid.Environment.reset", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ <span class='pyx_c_api'>__Pyx_AddTraceback</span>("env.mettagrid.c_grid.Environment.reset", __pyx_clineno, __pyx_lineno, __pyx_filename);
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_9mettagrid_6c_grid_11Environment_2reset(((struct __pyx_obj_9mettagrid_6c_grid_Environment *)__pyx_v_self), __pyx_v_observations, __pyx_v_seed);
+ __pyx_r = __pyx_pf_3env_9mettagrid_6c_grid_11Environment_2reset(((struct __pyx_obj_3env_9mettagrid_6c_grid_Environment *)__pyx_v_self), __pyx_v_observations, __pyx_v_seed);
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
@@ -877,7 +876,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
return __pyx_r;
}
-static PyObject *__pyx_pf_9mettagrid_6c_grid_11Environment_2reset(struct __pyx_obj_9mettagrid_6c_grid_Environment *__pyx_v_self, PyObject *__pyx_v_observations, CYTHON_UNUSED PyObject *__pyx_v_seed) {
+static PyObject *__pyx_pf_3env_9mettagrid_6c_grid_11Environment_2reset(struct __pyx_obj_3env_9mettagrid_6c_grid_Environment *__pyx_v_self, PyObject *__pyx_v_observations, CYTHON_UNUSED PyObject *__pyx_v_seed) {
int __pyx_v_left;
int __pyx_v_right;
int __pyx_v_spawn_idx;
@@ -892,7 +891,7 @@ static PyObject *__pyx_pf_9mettagrid_6c_grid_11Environment_2reset(struct __pyx_o
__pyx_L1_error:;
__PYX_XCLEAR_MEMVIEW(&__pyx_t_1, 1);
__PYX_XCLEAR_MEMVIEW(&__pyx_t_3, 1);
- <span class='pyx_c_api'>__Pyx_AddTraceback</span>("mettagrid.c_grid.Environment.reset", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ <span class='pyx_c_api'>__Pyx_AddTraceback</span>("env.mettagrid.c_grid.Environment.reset", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r);
@@ -905,12 +904,12 @@ static PyObject *__pyx_pf_9mettagrid_6c_grid_11Environment_2reset(struct __pyx_o
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__21);
__pyx_codeobj__22 = (PyObject*)<span class='pyx_c_api'>__Pyx_PyCode_New</span>(3, 0, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__21, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_env_mettagrid_c_grid_pyx, __pyx_n_s_reset, 56, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__22)) __PYX_ERR(0, 56, __pyx_L1_error)</span>
/* … */
- __pyx_t_7 = <span class='pyx_c_api'>__Pyx_CyFunction_New</span>(&__pyx_mdef_9mettagrid_6c_grid_11Environment_3reset, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Environment_reset, NULL, __pyx_n_s_mettagrid_c_grid, __pyx_d, ((PyObject *)__pyx_codeobj__22));<span class='error_goto'> if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 56, __pyx_L1_error)</span>
+ __pyx_t_7 = <span class='pyx_c_api'>__Pyx_CyFunction_New</span>(&__pyx_mdef_3env_9mettagrid_6c_grid_11Environment_3reset, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Environment_reset, NULL, __pyx_n_s_env_mettagrid_c_grid, __pyx_d, ((PyObject *)__pyx_codeobj__22));<span class='error_goto'> if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 56, __pyx_L1_error)</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_7);
<span class='pyx_c_api'>__Pyx_CyFunction_SetDefaultsTuple</span>(__pyx_t_7, __pyx_tuple__23);
- if (<span class='pyx_c_api'>__Pyx_SetItemOnTypeDict</span>((PyObject *)__pyx_ptype_9mettagrid_6c_grid_Environment, __pyx_n_s_reset, __pyx_t_7) < 0) <span class='error_goto'>__PYX_ERR(0, 56, __pyx_L1_error)</span>
+ if (<span class='pyx_c_api'>__Pyx_SetItemOnTypeDict</span>((PyObject *)__pyx_ptype_3env_9mettagrid_6c_grid_Environment, __pyx_n_s_reset, __pyx_t_7) < 0) <span class='error_goto'>__PYX_ERR(0, 56, __pyx_L1_error)</span>
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_7); __pyx_t_7 = 0;
- <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_9mettagrid_6c_grid_Environment);
+ <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_3env_9mettagrid_6c_grid_Environment);
__pyx_tuple__23 = <span class='py_c_api'>PyTuple_Pack</span>(1, __pyx_int_0);<span class='error_goto'> if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 56, __pyx_L1_error)</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__23);
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__23);
@@ -954,7 +953,7 @@ __pyx_t_3.strides[1] = __pyx_v_self->grid.strides[1];
__pyx_t_3.suboffsets[1] = -1;
{
- unsigned char __pyx_temp_scalar = __pyx_v_9mettagrid_6c_grid_WALL;
+ unsigned char __pyx_temp_scalar = __pyx_v_3env_9mettagrid_6c_grid_WALL;
{
Py_ssize_t __pyx_temp_extent_0 = __pyx_t_3.shape[0];
Py_ssize_t __pyx_temp_stride_0 = __pyx_t_3.strides[0];
@@ -1004,7 +1003,7 @@ __pyx_t_3.strides[1] = __pyx_v_self->grid.strides[1];
__pyx_t_3.suboffsets[1] = -1;
{
- unsigned char __pyx_temp_scalar = __pyx_v_9mettagrid_6c_grid_WALL;
+ unsigned char __pyx_temp_scalar = __pyx_v_3env_9mettagrid_6c_grid_WALL;
{
Py_ssize_t __pyx_temp_extent_0 = __pyx_t_3.shape[0];
Py_ssize_t __pyx_temp_stride_0 = __pyx_t_3.strides[0];
@@ -1054,7 +1053,7 @@ __pyx_t_2 = -1;
}
{
- unsigned char __pyx_temp_scalar = __pyx_v_9mettagrid_6c_grid_WALL;
+ unsigned char __pyx_temp_scalar = __pyx_v_3env_9mettagrid_6c_grid_WALL;
{
Py_ssize_t __pyx_temp_extent_0 = __pyx_t_3.shape[0];
Py_ssize_t __pyx_temp_stride_0 = __pyx_t_3.strides[0];
@@ -1104,7 +1103,7 @@ __pyx_t_2 = -1;
}
{
- unsigned char __pyx_temp_scalar = __pyx_v_9mettagrid_6c_grid_WALL;
+ unsigned char __pyx_temp_scalar = __pyx_v_3env_9mettagrid_6c_grid_WALL;
{
Py_ssize_t __pyx_temp_extent_0 = __pyx_t_3.shape[0];
Py_ssize_t __pyx_temp_stride_0 = __pyx_t_3.strides[0];
@@ -1157,7 +1156,7 @@ __pyx_t_2 = -1;
</pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">074</span>: <span class="bp">self</span><span class="o">.</span><span class="n">grid</span><span class="p">[</span><span class="n">r</span><span class="p">,</span> <span class="n">c</span><span class="p">]</span> <span class="o">=</span> <span class="n">AGENT</span></pre>
<pre class='cython code score-0 '> __pyx_t_7 = __pyx_v_r;
__pyx_t_6 = __pyx_v_c;
- *((unsigned char *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_self->grid.data + __pyx_t_7 * __pyx_v_self->grid.strides[0]) ) + __pyx_t_6 * __pyx_v_self->grid.strides[1]) )) = __pyx_v_9mettagrid_6c_grid_AGENT;
+ *((unsigned char *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_self->grid.data + __pyx_t_7 * __pyx_v_self->grid.strides[0]) ) + __pyx_t_6 * __pyx_v_self->grid.strides[1]) )) = __pyx_v_3env_9mettagrid_6c_grid_AGENT;
</pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">075</span>: <span class="bp">self</span><span class="o">.</span><span class="n">agent_positions</span><span class="p">[</span><span class="n">agent_idx</span><span class="p">,</span> <span class="mf">0</span><span class="p">]</span> <span class="o">=</span> <span class="n">r</span></pre>
<pre class='cython code score-0 '> __pyx_t_6 = __pyx_v_agent_idx;
__pyx_t_7 = 0;
@@ -1177,19 +1176,19 @@ __pyx_t_2 = -1;
<pre class='cython code score-0 '> goto __pyx_L4_break;
</pre><pre class="cython line score-0"> <span class="">080</span>: </pre>
<pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">081</span>: <span class="bp">self</span><span class="o">.</span><span class="n">_compute_observations</span><span class="p">()</span></pre>
-<pre class='cython code score-0 '> ((struct __pyx_vtabstruct_9mettagrid_6c_grid_Environment *)__pyx_v_self->__pyx_vtab)->_compute_observations(__pyx_v_self);<span class='error_goto'> if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 81, __pyx_L1_error)</span>
+<pre class='cython code score-0 '> ((struct __pyx_vtabstruct_3env_9mettagrid_6c_grid_Environment *)__pyx_v_self->__pyx_vtab)->_compute_observations(__pyx_v_self);<span class='error_goto'> if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 81, __pyx_L1_error)</span>
</pre><pre class="cython line score-0"> <span class="">082</span>: </pre>
<pre class="cython line score-55" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">083</span>: <span class="k">def</span> <span class="nf">step</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">np_actions</span><span class="p">):</span></pre>
<pre class='cython code score-55 '>/* Python wrapper */
-static PyObject *__pyx_pw_9mettagrid_6c_grid_11Environment_5step(PyObject *__pyx_v_self,
+static PyObject *__pyx_pw_3env_9mettagrid_6c_grid_11Environment_5step(PyObject *__pyx_v_self,
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
-static PyMethodDef __pyx_mdef_9mettagrid_6c_grid_11Environment_5step = {"step", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9mettagrid_6c_grid_11Environment_5step, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
-static PyObject *__pyx_pw_9mettagrid_6c_grid_11Environment_5step(PyObject *__pyx_v_self,
+static PyMethodDef __pyx_mdef_3env_9mettagrid_6c_grid_11Environment_5step = {"step", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_3env_9mettagrid_6c_grid_11Environment_5step, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_3env_9mettagrid_6c_grid_11Environment_5step(PyObject *__pyx_v_self,
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
@@ -1256,11 +1255,11 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
<span class='pyx_c_api'>__Pyx_Arg_XDECREF_FASTCALL</span>(values[__pyx_temp]);
}
}
- <span class='pyx_c_api'>__Pyx_AddTraceback</span>("mettagrid.c_grid.Environment.step", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ <span class='pyx_c_api'>__Pyx_AddTraceback</span>("env.mettagrid.c_grid.Environment.step", __pyx_clineno, __pyx_lineno, __pyx_filename);
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_9mettagrid_6c_grid_11Environment_4step(((struct __pyx_obj_9mettagrid_6c_grid_Environment *)__pyx_v_self), __pyx_v_np_actions);
+ __pyx_r = __pyx_pf_3env_9mettagrid_6c_grid_11Environment_4step(((struct __pyx_obj_3env_9mettagrid_6c_grid_Environment *)__pyx_v_self), __pyx_v_np_actions);
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
@@ -1276,7 +1275,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
return __pyx_r;
}
-static PyObject *__pyx_pf_9mettagrid_6c_grid_11Environment_4step(struct __pyx_obj_9mettagrid_6c_grid_Environment *__pyx_v_self, PyObject *__pyx_v_np_actions) {
+static PyObject *__pyx_pf_3env_9mettagrid_6c_grid_11Environment_4step(struct __pyx_obj_3env_9mettagrid_6c_grid_Environment *__pyx_v_self, PyObject *__pyx_v_np_actions) {
__Pyx_memviewslice __pyx_v_actions = { 0, 0, { 0 }, { 0 }, { 0 } };
int __pyx_v_agent_idx;
int __pyx_v_atn;
@@ -1295,7 +1294,7 @@ static PyObject *__pyx_pf_9mettagrid_6c_grid_11Environment_4step(struct __pyx_ob
__PYX_XCLEAR_MEMVIEW(&__pyx_t_1, 1);
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_8);
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_9);
- <span class='pyx_c_api'>__Pyx_AddTraceback</span>("mettagrid.c_grid.Environment.step", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ <span class='pyx_c_api'>__Pyx_AddTraceback</span>("env.mettagrid.c_grid.Environment.step", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__PYX_XCLEAR_MEMVIEW(&__pyx_v_actions, 1);
@@ -1308,11 +1307,11 @@ static PyObject *__pyx_pf_9mettagrid_6c_grid_11Environment_4step(struct __pyx_ob
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__24);
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__24);
/* … */
- __pyx_t_7 = <span class='pyx_c_api'>__Pyx_CyFunction_New</span>(&__pyx_mdef_9mettagrid_6c_grid_11Environment_5step, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Environment_step, NULL, __pyx_n_s_mettagrid_c_grid, __pyx_d, ((PyObject *)__pyx_codeobj__25));<span class='error_goto'> if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 83, __pyx_L1_error)</span>
+ __pyx_t_7 = <span class='pyx_c_api'>__Pyx_CyFunction_New</span>(&__pyx_mdef_3env_9mettagrid_6c_grid_11Environment_5step, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Environment_step, NULL, __pyx_n_s_env_mettagrid_c_grid, __pyx_d, ((PyObject *)__pyx_codeobj__25));<span class='error_goto'> if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 83, __pyx_L1_error)</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_7);
- if (<span class='pyx_c_api'>__Pyx_SetItemOnTypeDict</span>((PyObject *)__pyx_ptype_9mettagrid_6c_grid_Environment, __pyx_n_s_step, __pyx_t_7) < 0) <span class='error_goto'>__PYX_ERR(0, 83, __pyx_L1_error)</span>
+ if (<span class='pyx_c_api'>__Pyx_SetItemOnTypeDict</span>((PyObject *)__pyx_ptype_3env_9mettagrid_6c_grid_Environment, __pyx_n_s_step, __pyx_t_7) < 0) <span class='error_goto'>__PYX_ERR(0, 83, __pyx_L1_error)</span>
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_7); __pyx_t_7 = 0;
- <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_9mettagrid_6c_grid_Environment);
+ <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_3env_9mettagrid_6c_grid_Environment);
__pyx_codeobj__25 = (PyObject*)<span class='pyx_c_api'>__Pyx_PyCode_New</span>(2, 0, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__24, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_env_mettagrid_c_grid_pyx, __pyx_n_s_step, 83, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__25)) __PYX_ERR(0, 83, __pyx_L1_error)</span>
</pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">084</span>: <span class="k">cdef</span> <span class="kt">unsigned</span> <span class="kt">int</span>[<span class="p">:]</span> <span class="n">actions</span> <span class="o">=</span> <span class="n">np_actions</span></pre>
<pre class='cython code score-2 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_to_MemoryviewSlice_ds_unsigned_int</span>(__pyx_v_np_actions, PyBUF_WRITABLE);<span class='error_goto'> if (unlikely(!__pyx_t_1.memview)) __PYX_ERR(0, 84, __pyx_L1_error)</span>
@@ -1341,14 +1340,14 @@ static PyObject *__pyx_pf_9mettagrid_6c_grid_11Environment_4step(struct __pyx_ob
</pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">091</span>: <span class="n">dc</span> <span class="o">=</span> <span class="mf">0</span></pre>
<pre class='cython code score-0 '> __pyx_v_dc = 0;
</pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">092</span>: <span class="k">if</span> <span class="n">atn</span> <span class="o">==</span> <span class="n">PASS</span><span class="p">:</span></pre>
-<pre class='cython code score-0 '> __pyx_t_7 = (__pyx_v_atn == __pyx_v_9mettagrid_6c_grid_PASS);
+<pre class='cython code score-0 '> __pyx_t_7 = (__pyx_v_atn == __pyx_v_3env_9mettagrid_6c_grid_PASS);
if (__pyx_t_7) {
/* … */
}
</pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">093</span>: <span class="k">continue</span></pre>
<pre class='cython code score-0 '> goto __pyx_L3_continue;
</pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">094</span>: <span class="k">elif</span> <span class="n">atn</span> <span class="o">==</span> <span class="n">NORTH</span><span class="p">:</span></pre>
-<pre class='cython code score-0 '> __pyx_t_7 = (__pyx_v_atn == __pyx_v_9mettagrid_6c_grid_NORTH);
+<pre class='cython code score-0 '> __pyx_t_7 = (__pyx_v_atn == __pyx_v_3env_9mettagrid_6c_grid_NORTH);
if (__pyx_t_7) {
/* … */
goto __pyx_L5;
@@ -1356,7 +1355,7 @@ static PyObject *__pyx_pf_9mettagrid_6c_grid_11Environment_4step(struct __pyx_ob
</pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">095</span>: <span class="n">dr</span> <span class="o">=</span> <span class="o">-</span><span class="mf">1</span></pre>
<pre class='cython code score-0 '> __pyx_v_dr = -1;
</pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">096</span>: <span class="k">elif</span> <span class="n">atn</span> <span class="o">==</span> <span class="n">SOUTH</span><span class="p">:</span></pre>
-<pre class='cython code score-0 '> __pyx_t_7 = (__pyx_v_atn == __pyx_v_9mettagrid_6c_grid_SOUTH);
+<pre class='cython code score-0 '> __pyx_t_7 = (__pyx_v_atn == __pyx_v_3env_9mettagrid_6c_grid_SOUTH);
if (__pyx_t_7) {
/* … */
goto __pyx_L5;
@@ -1364,7 +1363,7 @@ static PyObject *__pyx_pf_9mettagrid_6c_grid_11Environment_4step(struct __pyx_ob
</pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">097</span>: <span class="n">dr</span> <span class="o">=</span> <span class="mf">1</span></pre>
<pre class='cython code score-0 '> __pyx_v_dr = 1;
</pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">098</span>: <span class="k">elif</span> <span class="n">atn</span> <span class="o">==</span> <span class="n">EAST</span><span class="p">:</span></pre>
-<pre class='cython code score-0 '> __pyx_t_7 = (__pyx_v_atn == __pyx_v_9mettagrid_6c_grid_EAST);
+<pre class='cython code score-0 '> __pyx_t_7 = (__pyx_v_atn == __pyx_v_3env_9mettagrid_6c_grid_EAST);
if (__pyx_t_7) {
/* … */
goto __pyx_L5;
@@ -1372,7 +1371,7 @@ static PyObject *__pyx_pf_9mettagrid_6c_grid_11Environment_4step(struct __pyx_ob
</pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">099</span>: <span class="n">dc</span> <span class="o">=</span> <span class="mf">1</span></pre>
<pre class='cython code score-0 '> __pyx_v_dc = 1;
</pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">100</span>: <span class="k">elif</span> <span class="n">atn</span> <span class="o">==</span> <span class="n">WEST</span><span class="p">:</span></pre>
-<pre class='cython code score-0 '> __pyx_t_7 = (__pyx_v_atn == __pyx_v_9mettagrid_6c_grid_WEST);
+<pre class='cython code score-0 '> __pyx_t_7 = (__pyx_v_atn == __pyx_v_3env_9mettagrid_6c_grid_WEST);
if (likely(__pyx_t_7)) {
/* … */
goto __pyx_L5;
@@ -1413,11 +1412,11 @@ static PyObject *__pyx_pf_9mettagrid_6c_grid_11Environment_4step(struct __pyx_ob
</pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">109</span>: <span class="bp">self</span><span class="o">.</span><span class="n">grid</span><span class="p">[</span><span class="n">r</span><span class="p">,</span> <span class="n">c</span><span class="p">]</span> <span class="o">=</span> <span class="n">EMPTY</span></pre>
<pre class='cython code score-0 '> __pyx_t_6 = __pyx_v_r;
__pyx_t_5 = __pyx_v_c;
- *((unsigned char *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_self->grid.data + __pyx_t_6 * __pyx_v_self->grid.strides[0]) ) + __pyx_t_5 * __pyx_v_self->grid.strides[1]) )) = __pyx_v_9mettagrid_6c_grid_EMPTY;
+ *((unsigned char *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_self->grid.data + __pyx_t_6 * __pyx_v_self->grid.strides[0]) ) + __pyx_t_5 * __pyx_v_self->grid.strides[1]) )) = __pyx_v_3env_9mettagrid_6c_grid_EMPTY;
</pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">110</span>: <span class="bp">self</span><span class="o">.</span><span class="n">grid</span><span class="p">[</span><span class="n">dest_r</span><span class="p">,</span> <span class="n">dest_c</span><span class="p">]</span> <span class="o">=</span> <span class="n">AGENT</span></pre>
<pre class='cython code score-0 '> __pyx_t_5 = __pyx_v_dest_r;
__pyx_t_6 = __pyx_v_dest_c;
- *((unsigned char *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_self->grid.data + __pyx_t_5 * __pyx_v_self->grid.strides[0]) ) + __pyx_t_6 * __pyx_v_self->grid.strides[1]) )) = __pyx_v_9mettagrid_6c_grid_AGENT;
+ *((unsigned char *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_self->grid.data + __pyx_t_5 * __pyx_v_self->grid.strides[0]) ) + __pyx_t_6 * __pyx_v_self->grid.strides[1]) )) = __pyx_v_3env_9mettagrid_6c_grid_AGENT;
</pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">111</span>: <span class="bp">self</span><span class="o">.</span><span class="n">agent_positions</span><span class="p">[</span><span class="n">agent_idx</span><span class="p">,</span> <span class="mf">0</span><span class="p">]</span> <span class="o">=</span> <span class="n">dest_r</span></pre>
<pre class='cython code score-0 '> __pyx_t_6 = __pyx_v_agent_idx;
__pyx_t_5 = 0;
@@ -1428,5 +1427,5 @@ static PyObject *__pyx_pf_9mettagrid_6c_grid_11Environment_4step(struct __pyx_ob
*((unsigned int *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_self->agent_positions.data + __pyx_t_5 * __pyx_v_self->agent_positions.strides[0]) ) + __pyx_t_6 * __pyx_v_self->agent_positions.strides[1]) )) = __pyx_v_dest_c;
</pre><pre class="cython line score-0"> <span class="">113</span>: </pre>
<pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">114</span>: <span class="bp">self</span><span class="o">.</span><span class="n">_compute_observations</span><span class="p">()</span></pre>
-<pre class='cython code score-0 '> ((struct __pyx_vtabstruct_9mettagrid_6c_grid_Environment *)__pyx_v_self->__pyx_vtab)->_compute_observations(__pyx_v_self);<span class='error_goto'> if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 114, __pyx_L1_error)</span>
+<pre class='cython code score-0 '> ((struct __pyx_vtabstruct_3env_9mettagrid_6c_grid_Environment *)__pyx_v_self->__pyx_vtab)->_compute_observations(__pyx_v_self);<span class='error_goto'> if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 114, __pyx_L1_error)</span>
</pre></div></body></html>
diff --git a/third_party/pufferlib b/third_party/pufferlib
--- a/third_party/pufferlib
+++ b/third_party/pufferlib
@@ -1 +1 @@
-Subproject commit 1460b4d5b58a17b6d494bf8cfae631690bf023a4
+Subproject commit 1460b4d5b58a17b6d494bf8cfae631690bf023a4-dirty
diff --git a/third_party/sample_factory b/third_party/sample_factory
index 5ffcbcc..9d990ea 160000
--- a/third_party/sample_factory
+++ b/third_party/sample_factory
@@ -1 +1 @@
-Subproject commit 5ffcbcc19482a8c5e63570591b45da62822ee87b
+Subproject commit 9d990eaf3fd40c635febe5b3e67d5c7d3bb7a9cb
|