From 87ec5eba2bd862a7a76046aef73d1c3b8dbe99d4 Mon Sep 17 00:00:00 2001 From: s473561 Date: Mon, 29 May 2023 00:13:02 +0200 Subject: [PATCH 1/5] korzystanie z drzewa w main --- __pycache__/ekran.cpython-311.pyc | Bin 4663 -> 5998 bytes __pycache__/etykieta.cpython-311.pyc | Bin 1296 -> 1334 bytes __pycache__/grid.cpython-311.pyc | Bin 2026 -> 2931 bytes __pycache__/main.cpython-311.pyc | Bin 4403 -> 5197 bytes __pycache__/packageList.cpython-311.pyc | Bin 1354 -> 1202 bytes __pycache__/paczka.cpython-311.pyc | Bin 3450 -> 6120 bytes __pycache__/regal.cpython-311.pyc | Bin 3260 -> 4513 bytes __pycache__/wozek.cpython-311.pyc | Bin 6076 -> 6903 bytes __pycache__/wyszukiwanie.cpython-311.pyc | Bin 4172 -> 7045 bytes ekran.py | 58 ++++++++----- grid.py | 19 +++-- main.py | 103 ++++++++++++++++++++--- packageList.py | 17 ++-- paczka.py | 58 ++++++++++++- plansza.py | 2 +- regal.py | 42 +++++++-- wozek.py | 4 +- wyszukiwanie.py | 6 +- 18 files changed, 250 insertions(+), 59 deletions(-) diff --git a/__pycache__/ekran.cpython-311.pyc b/__pycache__/ekran.cpython-311.pyc index bcff85184f1b2289e220b22331b4f0bb5c7f9a10..fb3378d62cb05c7750db3b2e5958055af5e37f6d 100644 GIT binary patch literal 5998 zcmc&&O>7&-6`ox#N$v7S67^?UmMzIjWXeS>Ig;!;X&n7Hjcr*@Bs*>hCF+{HRw?mE zo~3G$U8StyB19mdF3`X-PysYhxeAN|271XcKzj&!;tCsxSU`Y*A_wHV~l0oj0>H@6FHKH{W~1zXk#Vf~5XSk?#2r`Zsy86K7SPJz)^Kha@C1aTFmX z8)p)1giW|2t^^n167GmQ;fZ(>-iS9*6RAn?5k4VAgoH2RV+g-1?oR|FfkZG8r0-n3 z_6m~RkvhorGMWq7Qx+QRnzNMaVUo?)dPK1Vx~|y^puP+5f%(~ zso!8Tke5zE33=&tC?P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V@?2N3i%89I{1%Kvw_&kK#V3 delta 287 zcmdnSHGzwFIWI340}$wkg{5RnEk*{+VAc|1$;!{nyTw|Rn3tYTZlX-=wLk>cbtEZX+$j38sNlOMt2UvS8R4Fv#R`8_89 diff --git a/__pycache__/grid.cpython-311.pyc b/__pycache__/grid.cpython-311.pyc index 2c1301437996be7e15809a509b3f1f77c3b7cc05..4416952918c1b1ec787a574c09849a7abe990a5f 100644 GIT binary patch literal 2931 zcmb_eO=ufO6rR~1{aLo`GP3etX(^Dv}i9!^bA{vz_#W9!SG+yF0K@v1k z5;c$H(Y%sZ^GQCdjm(ry821wZd3a4Re3%zwktLN2 zYAQ9Dom3g_>=g>X!ckw?WBX)Tk87$d+W}eDCX`GH$3a<6XW}WBB7EN8+iMH`Jr^$9 z;?*lX7kZb;7RZygUnb7Rh76S%v1sp=E3xQABBQCgX~YHwhoYByV%@T#YN}zf*g($A zByxIOzNDLKDmkX=iSc->GBNe6e0?IP-j0pIeoswiSrh1Yzyky0eSn$DZ@n%!6D>io zex?_H>`M#mbxY{6(lCMro)BojZo#xC+Vh}Q38BdXMwB@uZ zI>n80=<&I>xs#^PU53tdlD;$_<@TZ|d=6M@>7}*3<#*C6T7p&f8@9)wzl!3@?@2eS zD7$IiDPQ4g+_q`rowyC`S5aK~J?YhwyJ_AjU*Xzcwg~>mFmfB%ucEl}d(x{VchkI6 zzRWe+2(fi229Yw&PYX5CQ}KUI^zc)H8$InNRz|m(m?dt5y;o6O+k4WhCCj_|Z}~FU zs8HFvIPIy~d#JpZn!SrtP=}nzZ+8-3=qpugj2?!U8*a2k7T3qrQfWMZ>qii<#xYD4 zhMzy?N5G=VFlCq*p$-9S07J*IdIYR_VJ|xlolTQA9k*%1rix8fn~oYNcC^%-BEvdh zA=g}8Un(^TH5orak(ePHO)Ujl=(yW{uYHqn{!bj3?b&EPScnw*@7}m~W0TN&SO&<` zjn31noge3gdw!tC3m+64k6De!HhCbvY-zpUksn^<7SAuFA4Che$LE*Q%h9JDOJ|>R zzeb)3&qrP~JyTYuejE9tbv2Lhqx5lm8 zsp75Fnm%czSy5-!n6Xhdun>75ERLXor`$^9iSVurz%iQdP;@}Vf$yWUJ+tYTM^3CB zIXxSlyOd8Cn(}Hf*lq>eH(Czdr}?4#*9z&M2Ns(O7Z>A?>C&-fe&PD#^h(pR@iek> z?a7&?q_zK3@SVTQfs)1z)EN1NHec?KWsmq!XFl9?2gdxc=(riAd zn@)h)Az6;=`h*!blM}ij%d8WbFbo)GQ0aqAuCH506wR5oitmu&pP?YdKb@MA{m8 zB&>&CyjD^0?%98!fm2?pcc z#trv~+Rx4MoBf6PYn&-;g}Lfu=4ws8qcZjezIfcy$)hqhW-&VkUK1=wN(EAz~LVt=rTAFbli z-~gjx0Kt;>ezCBlK2lsY{H7PV7MezR&eg84JI8KAVVnA<5$qSp*qR=`H%|BTsz5Qq z#LlFnh!hZlghv<~`0+8FID(@@*tC&<33;NY$MpFFom?Xe1d88-)R=LUpghJ;#GHaA zI`KrOpovbLbPY&rMo`1;R{H#f TOpc!$vVY+_YCr#Dpr85+@_ex= diff --git a/__pycache__/main.cpython-311.pyc b/__pycache__/main.cpython-311.pyc index fc5784cbb844733c394feb1053d7e566feac0604..e376a9374a2174c384c0cab4c13d35d53232d9b9 100644 GIT binary patch literal 5197 zcmb_gZA{zf9k=spNKD!!lu!c4YiU}_K`G^+a4J^H)Z0aN?UAs=zB&JmpA6jYCc2d7ovLjDKmY9&He&{}Ns!rPO%l14@?7Xye zz3pu0@&EZhzyIs=>iinVD-m!df6Gz5P6YWotf-eRPrUjAAby5W2!%!vf9{R?QBc=K zbWy!uk3yb4Vu%|3Muj#+Oi{Dntk7r#^J9u^g}(y4jgiWz#czpP{Z^&j6v3la{;E9I z=0BoCXf$+Gb>aaa9;p=spv<=sznykaSXl9owF12TH5BRt-ue(v#Y-qVF zmuAR7m|Uhgz%cj-mC01y;(nphQ;0ELY(6JFZ5afa} zW{#!lOA(Uef=fY~4QS2*0tY`m_`Ui^1xy)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mEwCwPGz>wZ309>?@LeBL6UXgs_o~hofEj?l+x4-W8H{JfC_1NX9uGJimZc47zx@)!RS}j_h z8PNE}N85kC@;9+=4>j$fBH1<|dc2J&^SPGG(?*1CQO(N4@wltZRHD^O4_|p;uh`3w z;0?>)uT9qJ^G*7^r2d}J4ryY!PM>YkXC?aV3Ff$9Uj7ni#lSH=Q3@W>^9_2w8m-gI zO?p|Pms{@HN~{p(x)u1S`REQ0qI>aIQ+u)yIJ^uKmOP_l3sg8`9+)1IVwQS&+^7Veo@s)zUQ= z?87ae7;7_i+SjCg6773tLN>6vN>ndZnVO>y>-dhX;H&S*02A;H4F8Q+S6!?Ay0%oO z&o$|D5`C`2Fj{MecQov`;XR=pA7209`u$KTR17_VC9-iuFEr?dI=$4Smn0gjUHbC3 z1Z<+Gu)C0KibU{!i$uI`;Vd)=XK;q28aUnH%W9huF5?#UytDOxxm{9Etj^hmPcfO~ zQ@kkr0E?z9Cq|NKmJ?QRl~TXKWHOOvSm7dWv0^}!$%uR!jx+pi*3rR|y7#eRDL7jr zkx!BEV^9%(1liZ7*MM~=!Tm(I4pn?BWUY|5^#nn*kfore7P1x8)IxMYO?@p>5*qlO zprG{P-wCo74ExsiZTmpjGTTdMj?9Y<^CGNiv#)9P6$~xQc*%EUnQd5RrMVy0Ew45$ zuNI6a$gn?lgk~COMw(r%BYzY5CFE}zZTtBn<8;F~EqT6IH?A~|D+RLE0Z%p1RF$lw x`6il|(0tplMi9$w)R(`ZLnK|yHS``y?`e^y!utEK@4sG9Q(KS78E96W^&i19Z$1D3 diff --git a/__pycache__/packageList.cpython-311.pyc b/__pycache__/packageList.cpython-311.pyc index 6e569dac6068e9dcc81dc4a6c1ff0db42ef66dfc..5e540f6708d3bbdb81f28afee89d0b1f60c5478d 100644 GIT binary patch literal 1202 zcmbVL&1(}u6rcS_I!%*;617$cEmZ1)v>x;#A_|dGX=@=?VOdz0-DzmM*{m}gA)z5T z^x(mZQb>D}Ge_2dMSF(pptcY} zuotOf5v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nl`*pAtVVf3*d~&*r(qLC(^&@voDim)m){?<(voM}@@#FXBggmW4q}J$ z$MomhCle>e*E^^DX}Tq++Hwk(h3K2r*Q@(WEkS7uN>fle;aF3M^-0AAte^$$392a9 t7+ub#2LZ(%+Vsz2oLK~;%VUhY+z19%Tvxwn?DyY=$q>HTMb{Op^9Sez7jOUo diff --git a/__pycache__/paczka.cpython-311.pyc b/__pycache__/paczka.cpython-311.pyc index e68be215881fb5ad29fddbe88eaa1c5a53955fd0..c3f6e90c48774826ad648947750ca1e0a6762219 100644 GIT binary patch literal 6120 zcmeGgO>Y~=b(Wt??Ji}>q$}B$MA@;Oty4QGY!`N1H;LssP8^|*9JggvEY{p5yArvS zXP1zX*h**^-x0D|((-wj0>MCcy`@k+SUc=91M?jr>$Odb`O zG{cZ~ARkBvXdO%k1L!hRf_IP-QUh}#kHDNq0j&fPT7|z`(h(&vgT(M-f{Kj8UNXz` znrh0^na&7W1v}sR#YoptXK&LCfVb$jXbbS3)P|xfhn%(*Ra=_fE*H>Ybz&w=*pY4-}teuv6%xm@5 zy*!oR3Q$<}*VQYV5(13c4w+3c&ZDFM6}X4LGxx|dxJUcA6RgYqx4@nK&fH_q;6BjD zonT$=KiRdmcga!VfPZ(70)Y9pUI_vwc>7WzdlvVxFko=z-BO7Fw#UO19a1!Iw){s_^bE$NphmNXcaUWJCTKQPA;fUn2O|t@~ZScB#Q){3}ns-_d2H!M@mn+`jV zOPSx0iOg+>DP!V(oN!*gspdt&2^nfWi}#ZCj1e$Szytv)0ww`CQC(K##faeZUO}bN!>KD{s%9k_@$=8YZ5dvCLA&(q-w24wSW=s%PfpSsyX=vh?$!rOwZK z+gZlMMyx^C;hyl6PF#|43pV86OK6=HK8Y?z*VvIJJJMkHx7htQyTARt@oH$9Ur!$R zY<4Yqw3$3=A3N7bzS&B?3GWBmiILCVTT2{kCXO`{Vk;rS%UGKmzL#xs2W{@)`shS! zR9qW9*&IFjRp>7RU%%TJz0?}LRGnIWuRS&a)pYydI8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w`e}%@w!F{!0?d{Ja z)!*6dIE~g~jC@GZ;j0OJNEwi%LQyH@Nt>6XTO}Ecne@XO{)AXwirZ*~*lfh>yNI^~2iOkTNj{g$5 zbIE1uTlT!Gr3?5fpk%E^9>7MBVVE`=v-_Vm5|-$%jrb+{+lVYO42b%4SiQ0Q>y|M2 NPul&jZ3aZvE++f6nGJ@~?W^S*iezIiim^8MsN zxArs^ix99Iv$O2ALdaJnbrWmO{wZ*_2qTP^$pY0VMPDcjnjnxV!a^H_iQ57p&tdqc zg&rqSr!%@W)D)uhaHqu(3m#Q1X~LZVUVhJu%^s`5??f&2@rUBPIfq>)H%im`@8y z>d63|7x;T6m1`t~n-Y*=wVqY(K_yCaCBDSfmXz9%h%`wcYe<~&4-llS{#P1n1(A9g z#1Vi&V|{Z%z*+)^M-1+oMS-=}V=M+NT4#0&y<5@yAO>CtrmGd`^vKnzk%P8M6+hEP?Lg+?F@f|4} zx3I8uV0=%yHsC6{UaS;tU0;d&Pi3gSfVXDl;K8jCeqT=WSMs;P?&A-{&G_fG4w&TH z^d-^zXzt144tsI_<=ltF%?yu6 z&eDE96L~`icN49Bl&U-zy(stK_q}{Gn$2OpE8R7V726e!rJ}8ho`mUtgHhQkn1)fY z@V|zK1>GOf9y-D!vGwpEEKaL3AL`6p7y#eQA`AmOBPIsT3<7q*19Yr&0BgaoDt1Xz zv`YTKG5)Tz_YzU0jw*sLgsH0NDu%sWDjIg)Yn18ThbN!IJ%TL{l!=8qY_V*dHb)_V aH)37lcCvr8Dvwjp{Tudh?bkm7p6YK(chool diff --git a/__pycache__/regal.cpython-311.pyc b/__pycache__/regal.cpython-311.pyc index 888de4215b1543a642b6c07e9cad949fbadfec9b..37de8cc303e075649d3ba2c60ff19c476e642bd3 100644 GIT binary patch literal 4513 zcmd5<;cwf<6+eoUM46PGD7K~8PU@y!69rz{x@nzw*%Bvqx*&-cR4F=m!U%?>Rap|{ z9H}MZWI!JRj0p@Z16I@>GRz-}tU>m{!2X1N9v~S4N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f10oLllbF!Ia2ivsJ;QkH}J+AEXECt zZGu-ENH}+}r1FB%oZkTNBFD^ry{ z5>_X+3?uCxiGovh0OW!|!67>(d?e~5JI+H%CQ??L>`Yl;z1v!coOeKS_vr4Gv|8(u zBtC=^4$nHt;Dbyy!%e{@yT;Mo)q)#l>yhnHzESYX-nV%myWiGYAMH$&j^#^}j@4S% z`AL(G1vO1NR%=~{V#$IBV2@b6DSKG5-b$?AgPnLgIJuj50>H`s-%74Nk*Tl0m2Ef? zoi-p$2*Y9mW?_)hDK?pqbZUvoGP*6B$(re-k$)IDB!&kgkraBdmQQcN`3jxQB=U^3 zm|0%Y{YC?uNpNYX3jNq>APZUPvY20?O?Y$63rT)~(>)n>Imxm449^M2vE@E2?MNrV z#u!F5E&<7AwAy;QQ#?rcTwD3Lqb(6G`rsI_&jP5eu1>8mhXErUwSpcd?S1C#TA<}atK z!C^HxtOSR(VEAvr-mPG7tBx^n$PS5xMqux z58*>YnujK8H}Y{|1Y9tVf==P6)m;Mj8@N+(Y?LyC*(oNHTz-+!?Ma^H9_XZ)uDaZ-G0+UzZ74HFqEWV|!v{0Oae}~n0aYFO7tc^V$Dh<63wyoWK>V>Ft zwR{qI99YX$U0tfHOL28+!S<)VlD+0c-k>S`PZ#n8p4?wst_Hf*KzG&Mqq=*Fmo%@x zc*WSP>8MlahT)8)#JoKjIg4@J@li3n+IMI8-gVx*k6jRAAcFT>`~$F>jUWgObt%oi z8buLs?>fl7!EN8|b_8q$+%^ufZ*bdpyB(eg0dZ%s^T!A{92Ps{A_6sZkQwv+H=`GC A=Kufz diff --git a/ekran.py b/ekran.py index 85668d3..ca73794 100644 --- a/ekran.py +++ b/ekran.py @@ -1,11 +1,10 @@ import pygame from plansza import x1, y1, x2, y2, x3, y3, x4, y4, a_pix, b_pix -import packageList -import regal -import wozek +from regal import Regal, obliczPixeleNaPodstawieKratek +# import wozek from packageList import * -from paczka import Paczka +# from paczka import Paczka EKRAN_SZEROKOSC = 770 EKRAN_WYSOKOSC = 770 @@ -16,28 +15,45 @@ pygame.display.set_caption("Inteligentny wozek") icon = pygame.image.load('images/icon.png') pygame.display.set_icon(icon) -lista_paczek = packageList.zainicjuj_liste_paczek(a_pix, b_pix) +# lista_paczek = packageList.zainicjuj_liste_paczek(a_pix, b_pix) +lista_paczek = listOfPackages() + def narysuj_regaly(): - regal.Regal(1, 1, x1, y1) - regal.Regal(2, 1, x1, y1+1) - regal.Regal(3, 1, x1+1, y1) - regal.Regal(4, 1, x1+1, y1+1) + global lista_regalow + r1 = Regal('ogród', x1, y1) + r2 = Regal('ogród', x1, y1+1) + r3 = Regal('ogród', x1+1, y1) + r4 = Regal('ogród', x1+1, y1+1) - regal.Regal(5, 1, x2, y2) - regal.Regal(6, 1, x2, y2+1) - regal.Regal(7, 1, x2+1, y2) - regal.Regal(8, 1, x2+1, y2+1) + r5 = Regal('narzedzia', x2, y2) + r6 = Regal('narzedzia', x2, y2+1) + r7 = Regal('narzedzia', x2+1, y2) + r8 = Regal('narzedzia', x2+1, y2+1) - regal.Regal(9, 1, x3, y3) - regal.Regal(10, 1, x3, y3+1) - regal.Regal(11, 1, x3+1, y3) - regal.Regal(12, 1, x3+1, y3+1) + r9 = Regal('kuchnia', x3, y3) + r10 = Regal('kuchnia', x3, y3+1) + r11 = Regal('kuchnia', x3+1, y3) + r12 = Regal('kuchnia', x3+1, y3+1) - regal.Regal(13, 1, x4, y4) - regal.Regal(14, 1, x4, y4+1) - regal.Regal(15, 1, x4+1, y4) - regal.Regal(16, 1, x4+1, y4+1) + r13 = Regal('motoryzacja', x4, y4) + r14 = Regal('motoryzacja', x4, y4+1) + r15 = Regal('motoryzacja', x4+1, y4) + r16 = Regal('motoryzacja', x4+1, y4+1) + + lista_regalow = [r1,r2,r3,r4,r5,r6,r7,r8,r9,r10,r11,r12,r13,r14,r15,r16] + +def zwroc_regaly_kategoria(kategoria): + lista_reg = [] + for reg in lista_regalow: + if reg.nazwaRegalu == kategoria: + lista_reg.append(reg) + return lista_reg + +def zwroc_regaly_wspolrzedne(x_reg, y_reg): + for regal in lista_regalow: + if regal.wiersz == obliczPixeleNaPodstawieKratek(x_reg) and regal.kolumna == obliczPixeleNaPodstawieKratek(y_reg): + return regal def narysuj_siatke(): diff --git a/grid.py b/grid.py index 1227593..3909d4d 100644 --- a/grid.py +++ b/grid.py @@ -7,10 +7,17 @@ class GridCellType(Enum): FREE = 0 RACK = 1 PLACE = 2 - # dodać oznaczenie na miejsce dla paczek + +# class RackCellType(Enum): +# OGROD = 0 +# NARZEDZIA = 1 +# KUCHNIA = 2 +# MOTORYZACJA = 3 + class SearchGrid: grid: Dict[Tuple[int, int], GridCellType] = {} + # rack_grid : Dict[Tuple[int, int], GridCellType] = {} def __init__(self) -> None: self._init_grid() @@ -19,8 +26,10 @@ class SearchGrid: for i in range (0,14): for j in range(0,14): self.grid[(i, j)] = GridCellType.FREE - for r, c in [(x1, y1), (x1, y1+1), (x1+1, y1), (x1+1, y1+1), (x2, y2), (x2+1, y2), (x2, y2+1), (x2+1, y2+1), + for c, d in [(x1, y1), (x1, y1+1), (x1+1, y1), (x1+1, y1+1), (x2, y2), (x2+1, y2), (x2, y2+1), (x2+1, y2+1), (x3, y3), (x3+1, y3), (x3, y3+1), (x3+1, y3+1), (x4, y4), (x4+1, y4), (x4, y4+1), (x4+1, y4+1),]: - self.grid[(r,c)] = GridCellType.RACK - for m, n in [(a,b), (a+1,b), (a,b+1), (a+1,b+1)]: - self.grid[(m,n)] = GridCellType.PLACE + self.grid[(c,d)] = GridCellType.RACK + for e, f in [(a,b), (a+1,b), (a,b+1), (a+1,b+1)]: + self.grid[(e,f)] = GridCellType.PLACE + + diff --git a/main.py b/main.py index 89587e7..2cbd14b 100644 --- a/main.py +++ b/main.py @@ -1,35 +1,116 @@ import sys import pygame +from paczka import Paczka from wozek import Wozek import wyszukiwanie import ekran -from grid import SearchGrid +from grid import GridCellType, SearchGrid +from sklearn.tree import DecisionTreeClassifier +import pandas as pd + +from plansza import x1, y1, x2, y2, x3, y3, x4, y4, a_pix, b_pix pygame.init() def main(): wozek = Wozek() + paczka = Paczka('duzy', 10, 'ogród', False, True, False, any, any, any, any, any) + ekran.lista_paczek.add(paczka) + paczka.update_position(a_pix, b_pix) + + grid_points = SearchGrid() + while True: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit(0) if event.type == pygame.KEYDOWN and event.key == pygame.K_ESCAPE: sys.exit(0) + if event.type == pygame.KEYDOWN: + if event.key == pygame.K_SPACE: + ## wozek jedzie po paczke + wiersz = ekran.sprawdz_ktory_wiersz(a_pix) + kolumna = ekran.sprawdz_ktora_kolumna(b_pix) + docelowy_stan = wyszukiwanie.Stan(wiersz * 70, kolumna * 70, 1) + + #wezel = wyszukiwanie.wyszukiwanie_bfs(wozek.obecnyStan, docelowy_stan, grid_points) + wezel = wyszukiwanie.wyszukiwanie_a_star(wozek.obecnyStan, docelowy_stan, grid_points) + sciezka = wyszukiwanie.znajdz_sciezke(wezel) + wozek.przemiesc_wozek_po_sciezce(sciezka) + + if grid_points.grid[(wiersz, kolumna)] is GridCellType.PLACE: #picks up package + if wozek.ln == 0: + wozek.load_package() + wozek.dynamic_wozek_picture + print(wozek.storage) + + ## wozek jedzie odlozyc paczke na regal + paczka1 = wozek.storage.pop() + + array, reg = paczka1.tablica_do_drzewa('ogród') + + plikZPrzecinkami = open("DecisionTree/training_data.txt", 'w') + + with open('DecisionTree/200permutations_table.txt', 'r') as plik: + for linia in plik: + liczby = linia.strip() + wiersz = "" + licznik = 0 + for liczba in liczby: + wiersz += liczba + wiersz += ";" + wiersz = wiersz[:-1] + wiersz += '\n' + plikZPrzecinkami.write(wiersz) + + plikZPrzecinkami.close() + x = pd.read_csv('DecisionTree/training_data.txt', delimiter=';', + names=['wielkosc', 'waga,', 'priorytet', 'ksztalt', 'kruchosc', 'dolna', 'gorna', 'g > d']) + y = pd.read_csv('DecisionTree/decisions.txt', names=['polka']) + clf = DecisionTreeClassifier(criterion='entropy') + clf.fit(x.values, y.values) + + predictions = clf.predict([array]) + if predictions == 0: + print('odklada na dolna polke!') + else: + print('odklada na gorna polke!') + + docelowy_stan = wyszukiwanie.Stan(reg.numerWiersza * 70, reg.numerKolumny * 70, 1) # x1 i y1 bo to są regału kategorii ogród + wezel = wyszukiwanie.wyszukiwanie_a_star(wozek.obecnyStan, docelowy_stan, grid_points) + sciezka = wyszukiwanie.znajdz_sciezke(wezel) + wozek.przemiesc_wozek_po_sciezce(sciezka) + + # print(wozek.storage) + # if wozek.ln != 0: # drops package + # wozek.drop_package() + # wozek.dynamic_wozek_picture() + if event.type == pygame.MOUSEBUTTONDOWN: # lewy przycisk myszy if event.button == 1: - grid_points = SearchGrid() x = pygame.mouse.get_pos()[0] y = pygame.mouse.get_pos()[1] wiersz = ekran.sprawdz_ktory_wiersz(x) kolumna = ekran.sprawdz_ktora_kolumna(y) + docelowy_stan = wyszukiwanie.Stan(wiersz * 70, kolumna * 70, 1) - # wezel = wyszukiwanie.wyszukiwanie_bfs(wozek.obecnyStan, docelowy_stan, grid_points) + + #wezel = wyszukiwanie.wyszukiwanie_bfs(wozek.obecnyStan, docelowy_stan, grid_points) wezel = wyszukiwanie.wyszukiwanie_a_star(wozek.obecnyStan, docelowy_stan, grid_points) sciezka = wyszukiwanie.znajdz_sciezke(wezel) wozek.przemiesc_wozek_po_sciezce(sciezka) + # if grid_points.grid[(wiersz, kolumna)] is GridCellType.PLACE: #picks up package + # if wozek.ln == 0: + # wozek.load_package() + # wozek.dynamic_wozek_picture + # else: + # if wozek.ln != 0: # drops package + # wozek.drop_package() + # wozek.dynamic_wozek_picture() + if event.type == pygame.KEYDOWN: if event.key == pygame.K_DOWN: wozek.y_change = 1 @@ -46,14 +127,14 @@ def main(): if event.key == pygame.K_RIGHT or event.key == pygame.K_LEFT: wozek.x_change = 0 - if event.type == pygame.KEYDOWN: - if event.key == pygame.K_SPACE: - if wozek.ln == 0: - wozek.load_package() - wozek.dynamic_wozek_picture() - else: - wozek.drop_package() - wozek.dynamic_wozek_picture() + # if event.type == pygame.KEYDOWN: + # if event.key == pygame.K_SPACE: + # if wozek.ln == 0: + # wozek.load_package() + # wozek.dynamic_wozek_picture() + # else: + # wozek.drop_package() + # wozek.dynamic_wozek_picture() wozek.obecnyStan.x += wozek.x_change wozek.obecnyStan.y += wozek.y_change diff --git a/packageList.py b/packageList.py index 22cbc53..1a08d98 100644 --- a/packageList.py +++ b/packageList.py @@ -1,6 +1,6 @@ import pygame -from paczka import Paczka +# from paczka import Paczka class listOfPackages: list = [] @@ -15,9 +15,12 @@ class listOfPackages: self.package_group.remove(last_package) -def zainicjuj_liste_paczek(init_x, init_y): - packageList = listOfPackages() - demo_paczka = Paczka('duzy', 10, any, False, True, False, any, any, any, any, any) - demo_paczka.update_position(init_x, init_y) - packageList.add(demo_paczka) - return packageList +# def zainicjuj_liste_paczek(init_x, init_y): +# packageList = listOfPackages() +# demo_paczka = Paczka('duzy', 10, any, False, True, False, any, any, any, any, any) +# demo_paczka.update_position(init_x, init_y) +# packageList.add(demo_paczka) +# return packageList + + + diff --git a/paczka.py b/paczka.py index 3d2fd32..87fb725 100644 --- a/paczka.py +++ b/paczka.py @@ -1,9 +1,9 @@ from etykieta import Etykieta import pygame +import ekran class Paczka(pygame.sprite.Sprite): - def __init__(self, rozmiar, waga, kategoria, priorytet, ksztalt, kruchosc, nadawca, adres, imie, nazwisko, telefon): super().__init__() self.rozmiar = rozmiar @@ -68,4 +68,58 @@ class Paczka(pygame.sprite.Sprite): def update_position(self, x, y): self.x = x self.y = y - self.rect.topleft = (x, y) \ No newline at end of file + self.rect.topleft = (x, y) + + def tablica_do_drzewa(self, kategoria): + tablica = [] + + # rozmiar + if self.rozmiar == 'maly': + tablica.append(0) + elif self.rozmiar == 'sredni': + tablica.append(1) + else: tablica.append(2) + + # waga + if self.waga == 'maly': + tablica.append(0) + elif self.waga == 'sredni': + tablica.append(1) + else: tablica.append(2) + + # piorytet + if self.priorytet is True: + tablica.append(0) + else: tablica.append(1) + + # kształt + if self.ksztalt is True: + tablica.append(0) + else: tablica.append(1) + + # kruchość + if self.kruchosc is True: + tablica.append(0) + else: tablica.append(1) + + reg = ekran.zwroc_regaly_kategoria(kategoria) + + # czy dolna wolna + if reg[0].is_dolna_free() is True: + tablica.append(0) + else: + tablica.append(1) + + #czy górna wolna + if reg[0].is_dolna_free() is True: + tablica.append(0) + else: + tablica.append(1) + + # czy na górnej więcej miejsca + if reg[0].is_dolna_free() is True: + tablica.append(0) + else: + tablica.append(1) + + return tablica, reg[0] \ No newline at end of file diff --git a/plansza.py b/plansza.py index 08e9a0c..d2f2546 100644 --- a/plansza.py +++ b/plansza.py @@ -2,7 +2,7 @@ import random def obliczPixeleNaPodstawieKratek(wymiar): #Przeliczanie współrzędnych podanych w kratkach na pixele i = 1 - pixele = 73 + pixele = 70 while (i < wymiar): pixele = pixele + 70 i = i + 1 diff --git a/regal.py b/regal.py index 71234f8..89fbe12 100644 --- a/regal.py +++ b/regal.py @@ -1,5 +1,6 @@ import pygame +MAX_STORAGE = 3 def obliczPixeleNaPodstawieKratek(wymiar): #Przeliczanie współrzędnych podanych w kratkach na pixele i = 1 @@ -13,19 +14,20 @@ def obliczPixeleNaPodstawieKratek(wymiar): #Przeliczanie współrzędnych podany def obliczPixeleDlugosciRegalu(self): #Przeliczanie dlugości regału podanego w kratkach na pixele i = 1 dlugoscRegalu = 40 - while (i < self.dlugoscRegaluWKratkach) and (i <= 11 - self.numerKolumny): #Sprawdzenie, żeby regał nie wychodził poza plansze, jeżeli tak to jest ucinany tak, żeby nie wychodził + while (i < 1) and (i <= 11 - self.numerKolumny): #Sprawdzenie, żeby regał nie wychodził poza plansze, jeżeli tak to jest ucinany tak, żeby nie wychodził dlugoscRegalu = dlugoscRegalu + 80 i = i + 1 return dlugoscRegalu class Regal(pygame.sprite.Sprite): - def __init__(self, numerRegalu, dlugoscRegaluWKratkach, numerWiersza, numerKolumny): + + def __init__(self, nazwaRegalu, numerWiersza, numerKolumny): super().__init__() from ekran import screen - self.numerRegalu = numerRegalu + self.nazwaRegalu = nazwaRegalu self.wysokoscRegalu = 64 - self.dlugoscRegaluWKratkach = dlugoscRegaluWKratkach self.numerKolumny = numerKolumny + self.numerWiersza = numerWiersza self.wiersz = obliczPixeleNaPodstawieKratek(numerWiersza) self.kolumna = obliczPixeleNaPodstawieKratek(numerKolumny) @@ -36,28 +38,52 @@ class Regal(pygame.sprite.Sprite): "dolna": package_storage, "gorna": package_storage } + + + storage_dolna = [] + storage_gorna = [] - if(self.numerRegalu >= 0 and self.numerRegalu <= 4): + self.dolna = storage_dolna + self.gorna = storage_gorna + + if(self.nazwaRegalu == 'ogród'): reg = pygame.Surface([self.dlugosc, self.wysokoscRegalu]) reg = pygame.image.load("images/regal.png") self.rect = reg.get_rect() screen.blit(reg, (self.wiersz, self.kolumna)) - if(self.numerRegalu >= 5 and self.numerRegalu <= 8): + if(self.nazwaRegalu == 'narzedzia'): reg = pygame.Surface([self.dlugosc, self.wysokoscRegalu]) reg = pygame.image.load("images/regal1.png") self.rect = reg.get_rect() screen.blit(reg, (self.wiersz, self.kolumna)) - if(self.numerRegalu >= 9 and self.numerRegalu <= 12): + if(self.nazwaRegalu == 'kuchnia'): reg = pygame.Surface([self.dlugosc, self.wysokoscRegalu]) reg = pygame.image.load("images/regal2.png") self.rect = reg.get_rect() screen.blit(reg, (self.wiersz, self.kolumna)) - if(self.numerRegalu >= 13 and self.numerRegalu <= 16): + if(self.nazwaRegalu == 'motoryzacja'): reg = pygame.Surface([self.dlugosc, self.wysokoscRegalu]) reg = pygame.image.load("images/regal3.png") self.rect = reg.get_rect() screen.blit(reg, (self.wiersz, self.kolumna)) + + def is_dolna_free(self): + if len(self.dolna) <= MAX_STORAGE: + return True + return False + + def is_gorna_free(self): + if len(self.gorna) <= MAX_STORAGE: + return True + return False + + def czy_na_gornej_wiecej_miejsca(self): + if len(self.gorna) > len(self.dolna): + return True + return False + + diff --git a/wozek.py b/wozek.py index a38cfac..867e5d1 100644 --- a/wozek.py +++ b/wozek.py @@ -1,7 +1,9 @@ import ekran import pygame,math -from packageList import listOfPackages +# from packageList import listOfPackages +from ekran import lista_paczek +listOfPackages = lista_paczek class Wozek(pygame.sprite.Sprite): def __init__(self): diff --git a/wyszukiwanie.py b/wyszukiwanie.py index 41c65f0..648a5bd 100644 --- a/wyszukiwanie.py +++ b/wyszukiwanie.py @@ -57,7 +57,7 @@ def znajdz_nastepcow(wezel, search_grid, ktory_algorytm): if ktory_algorytm == 1: x1 = x / 70 y1 = y / 70 - if search_grid.grid[(x1, y1)] is GridCellType.FREE: + if search_grid.grid[(x1, y1)] is GridCellType.FREE or search_grid.grid[(x1, y1)] is GridCellType.PLACE: wezly.append(ruch_w_przod) else: wezly.append(ruch_w_przod) @@ -131,7 +131,7 @@ def wyszukiwanie_a_star(poczatkowyStan, docelowyStan, search_grid): nastepca.g = g nastepca.h = h fringe[index] = nastepca - print(index) + # print(index) # heapq.heapify(fringe) return None @@ -147,6 +147,6 @@ def dobierz_wage_do_wezla(wezel, search_grid): elif search_grid.grid[(x1, y1)] is GridCellType.RACK: wezel.waga = 99999 elif search_grid.grid[(x1, y1)] is GridCellType.PLACE: - wezel.waga = 99999 + wezel.waga = 1 return None -- 2.20.1 From 230b94064bd13209cc3ab1df8e01a3b02e6827c0 Mon Sep 17 00:00:00 2001 From: s473561 Date: Mon, 29 May 2023 00:48:58 +0200 Subject: [PATCH 2/5] =?UTF-8?q?wozek=20odk=C5=82ada=20paczk=C4=99=20na=20r?= =?UTF-8?q?ega=C5=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- __pycache__/ekran.cpython-311.pyc | Bin 5998 -> 5622 bytes __pycache__/paczka.cpython-311.pyc | Bin 6120 -> 6116 bytes __pycache__/regal.cpython-311.pyc | Bin 4513 -> 4894 bytes __pycache__/wozek.cpython-311.pyc | Bin 6903 -> 6903 bytes ekran.py | 9 ++++----- main.py | 15 ++++++++------- paczka.py | 2 -- regal.py | 6 ++++++ 8 files changed, 18 insertions(+), 14 deletions(-) diff --git a/__pycache__/ekran.cpython-311.pyc b/__pycache__/ekran.cpython-311.pyc index fb3378d62cb05c7750db3b2e5958055af5e37f6d..47151c8f20826d2d4f8eb1985a91c2d1beee9488 100644 GIT binary patch delta 435 zcmaE-_f4C3IWI340}vd#TAVU>BCjOlt&Qrp7+D#E88ihq^DzBpXVjd`!Ij8pFgc4W zV6zmDI3t@ePiOE&jnME2PWtJeqe6qTL8LJnN>AX2ffRj5Bs7_dOh9Zi5SzKk zZgPvD8LK~#<2!l3;7wH@BqgR0CH6q-7FS+Te0F|LX>ML+k>BLKLK>_=K;clJ9?{MJ zg(MkG?10=NkkTS+AOW<+6G+`+1G_A-mZ}q9 w(g60p0f^-QB0#<`0{N^6Hq)$ delta 844 zcmY*XO=uHQ5PomdO>2@3`LWUvErFtKC=?3X784sZY5bwBKQ(Qw*06M!lIE|>CZrpp z73raeUStowc~dEZAh~!{@FWOrX`wC%o;*rH5K#}#Y?7jH*>Ao#^Ub{3dHbXP+ko^! zk{k?I?SrOlK9K_a%j;f~JH2ac?u^2xSlCy$3%}d>mLWJ~K4>V88><2(G?$3hhVS>s z2%D_bbdyQ2`Jo3wO<3YBXNlC!Rb$W5|MDo7wW`8N)Kfic{io+G{c0oFOlYeK3j$|T zY-3nKgno>M+u#Hm(_YD_pjE+5oAzumSI!sYu+0=#(x5JyqTVpb<(x*RhC(6eC2?1^ z0>uRi%Q-z=(UyxjsH#dqg%Ng-v2&==ZX!HlpS|6OOb`PWtcwRu&qj1VIP#`*Cm7oc z#&(^tZD;K5*!zk76l`lNJ1KoHrSB&6?Sy{d?^++H=jWl=s!)IBIK}M|EDaH3$64Z+ zjHIhayn>EMz2LG5(lv?^ge8a@58XW>3YzYM47yfcN-xU`)ocd(NOqARX1sF`iMNm@ z>VMqFc;GyFeF$LzqQpmu+aPIldxpdr+)NsGJfBYA{zr15A-RmkbQB=n7^V)>#*DX5 zoJ03?ea$<-&nA%q$smq^C(xKoyVaGf(Iq!$43i`xxNm&*-L>^%qY3}$RTw6}L}1;U z6H~MDqB@?@Nc)yEctFmd_=esx5#ZaJrpLLRsDn`+PMv&YA{$8Fu ze)3gOm(5p2l^NxYSmi%3;3g)Ei+8(~GBN@cVJADndSb8eDt-h@f5D-sNEhfZ0Q~GO ANB{r; delta 160 zcmaE&|3aU4IWI340}$*!Q=F2rk@vE&fHM;VLj%JNA(0OD4{QuP0-N6n$1+a7DC)Ag uS2Ueb-h@^D0|Rbivaoo!TR9^mP!V>rBdjO(3a{cvu=E!kii&iBP67aUwkyW~ diff --git a/__pycache__/regal.cpython-311.pyc b/__pycache__/regal.cpython-311.pyc index 37de8cc303e075649d3ba2c60ff19c476e642bd3..c7d75cf32b600c4e409ba000a017222f016ab678 100644 GIT binary patch delta 477 zcmZ3eJWq{pIWI340}$M}S)8(*XCt38Go#t$AZBfW6xJ4oDE1D93dSgoUVlLL4~MC*V$rZdzqr7&hQfpizi)G%aC-ped6Rl~T9k%3_~5JLbXLkdGM15lP} z@;+v{dhF7gOnyZmb2OQYWPsEyw#0&h)V!1;S%{bjNQ}K8F*!RiJ@poAc}8kcYB4iV zP(eYVhzBGoQBYbE4^WF^Z<`s5g*VTP0q=`_$`=<+$QS_7&Dem zP8JAL;$mS{|Gl= diff --git a/__pycache__/wozek.cpython-311.pyc b/__pycache__/wozek.cpython-311.pyc index 578d94e8a4f44a56c5402a8e4e186f08f170685b..406dafd25f29794a209f22189270ebe09a229eaa 100644 GIT binary patch delta 19 Zcmexv`rVXkIWI340}wpAxsmIw6aYh`2CD!7 delta 19 Zcmexv`rVXkIWI340}vP-+sO4+3IIPC1?B(% diff --git a/ekran.py b/ekran.py index ca73794..c009c34 100644 --- a/ekran.py +++ b/ekran.py @@ -50,11 +50,10 @@ def zwroc_regaly_kategoria(kategoria): lista_reg.append(reg) return lista_reg -def zwroc_regaly_wspolrzedne(x_reg, y_reg): - for regal in lista_regalow: - if regal.wiersz == obliczPixeleNaPodstawieKratek(x_reg) and regal.kolumna == obliczPixeleNaPodstawieKratek(y_reg): - return regal - +# def zwroc_regaly_wspolrzedne(x_reg, y_reg): +# for regal in lista_regalow: +# if regal.wiersz == obliczPixeleNaPodstawieKratek(x_reg) and regal.kolumna == obliczPixeleNaPodstawieKratek(y_reg): +# return regal def narysuj_siatke(): blockSize = 70 # Set the size of the grid block diff --git a/main.py b/main.py index 2cbd14b..ac27858 100644 --- a/main.py +++ b/main.py @@ -15,7 +15,7 @@ pygame.init() def main(): wozek = Wozek() - paczka = Paczka('duzy', 10, 'ogród', False, True, False, any, any, any, any, any) + paczka = Paczka('duzy', 10, 'narzedzia', False, True, False, any, any, any, any, any) ekran.lista_paczek.add(paczka) paczka.update_position(a_pix, b_pix) @@ -43,12 +43,11 @@ def main(): if wozek.ln == 0: wozek.load_package() wozek.dynamic_wozek_picture - print(wozek.storage) ## wozek jedzie odlozyc paczke na regal - paczka1 = wozek.storage.pop() + paczka1 = wozek.storage[0] - array, reg = paczka1.tablica_do_drzewa('ogród') + array, reg = paczka1.tablica_do_drzewa(paczka1.kategoria) plikZPrzecinkami = open("DecisionTree/training_data.txt", 'w') @@ -83,9 +82,11 @@ def main(): wozek.przemiesc_wozek_po_sciezce(sciezka) # print(wozek.storage) - # if wozek.ln != 0: # drops package - # wozek.drop_package() - # wozek.dynamic_wozek_picture() + if wozek.ln != 0: # drops package + wozek.drop_package() + reg.put_package_on_the_regal(paczka1, predictions) + wozek.dynamic_wozek_picture() + if event.type == pygame.MOUSEBUTTONDOWN: # lewy przycisk myszy diff --git a/paczka.py b/paczka.py index 87fb725..d9acda5 100644 --- a/paczka.py +++ b/paczka.py @@ -72,7 +72,6 @@ class Paczka(pygame.sprite.Sprite): def tablica_do_drzewa(self, kategoria): tablica = [] - # rozmiar if self.rozmiar == 'maly': tablica.append(0) @@ -103,7 +102,6 @@ class Paczka(pygame.sprite.Sprite): else: tablica.append(1) reg = ekran.zwroc_regaly_kategoria(kategoria) - # czy dolna wolna if reg[0].is_dolna_free() is True: tablica.append(0) diff --git a/regal.py b/regal.py index 89fbe12..c2c0649 100644 --- a/regal.py +++ b/regal.py @@ -85,5 +85,11 @@ class Regal(pygame.sprite.Sprite): return True return False + def put_package_on_the_regal(self, package, where): + if(where == 0): + self.dolna.append(package) + else: + self.gorna.append(package) + -- 2.20.1 From 7495d47f7fea0b844a20f632058853ffb5294406 Mon Sep 17 00:00:00 2001 From: s473561 Date: Mon, 29 May 2023 08:31:08 +0200 Subject: [PATCH 3/5] =?UTF-8?q?dwie=20przyk=C5=82adowe=20paczki?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- __pycache__/paczka.cpython-311.pyc | Bin 6116 -> 6117 bytes main.py | 3 ++- paczka.py | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/__pycache__/paczka.cpython-311.pyc b/__pycache__/paczka.cpython-311.pyc index cd4c73b9c951ecb3d5a414e2e453e8912662db1c..edfa5ff380e5ac0041764a6df9fd3a728f3e998c 100644 GIT binary patch delta 188 zcmaE&|5TrMIWI340}u$im867jxDHUM7$f2&AxqMdK&`<>z8# zpIjgi%gq9j0m^~+>0r^Q$$UIKlkEik!My0nF9nS-SggV#j2x4tgr%5Xa!ocAUe9Pf z`Jr$ID`S^khu!1=5ouPXuK134AWLkrfr$9#`65Rc8C@o)h+Sf|pKLC!&*(cjUAz_m D-(4`v delta 176 zcmaE=|3sg6IWI340}!maTAY%wk=KWxk#X`nKE=sr`NSBRCO_fJp8S`ei;-<|fj}%b z3rHadq=5M8V9}__d^|jp?F9Y7yy(d<1&uIRtimFU?31O0r6yYnuVJ*G{7g85o$V60 z+y!pA$?_s%JiLNEkux+d@hV;5RRRj=ZeAdAgptvCa;n%RM!U%t;`)p}lQYC?0jujU A!vFvP diff --git a/main.py b/main.py index ac27858..32bf3db 100644 --- a/main.py +++ b/main.py @@ -15,7 +15,8 @@ pygame.init() def main(): wozek = Wozek() - paczka = Paczka('duzy', 10, 'narzedzia', False, True, False, any, any, any, any, any) + #paczka = Paczka('duzy', 12, 'narzedzia', False, True, False, any, any, any, any, any) + paczka = Paczka('maly', 1, 'ogród', False, True, False, any, any, any, any, any) ekran.lista_paczek.add(paczka) paczka.update_position(a_pix, b_pix) diff --git a/paczka.py b/paczka.py index d9acda5..f59a55b 100644 --- a/paczka.py +++ b/paczka.py @@ -80,9 +80,9 @@ class Paczka(pygame.sprite.Sprite): else: tablica.append(2) # waga - if self.waga == 'maly': + if self.waga <= 2: tablica.append(0) - elif self.waga == 'sredni': + elif self.waga <= 10: tablica.append(1) else: tablica.append(2) -- 2.20.1 From 01e3724d8ef1d209aa596087ec8deaba308c2ce5 Mon Sep 17 00:00:00 2001 From: s473561 Date: Mon, 29 May 2023 11:00:58 +0200 Subject: [PATCH 4/5] =?UTF-8?q?na=20rampie=20mo=C5=BCe=20le=C5=BCe=C4=87?= =?UTF-8?q?=20kilka=20paczek?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- __pycache__/ekran.cpython-311.pyc | Bin 5622 -> 5941 bytes __pycache__/paczka.cpython-311.pyc | Bin 6117 -> 6146 bytes __pycache__/wozek.cpython-311.pyc | Bin 6903 -> 6825 bytes ekran.py | 18 +++++++++++---- main.py | 34 +++++++++++++++++++---------- paczka.py | 1 + wozek.py | 20 ++++++++++++----- 7 files changed, 51 insertions(+), 22 deletions(-) diff --git a/__pycache__/ekran.cpython-311.pyc b/__pycache__/ekran.cpython-311.pyc index 47151c8f20826d2d4f8eb1985a91c2d1beee9488..70bdb4e03d99309b7c37170c494b70c7768c225c 100644 GIT binary patch delta 1098 zcmZWoO-~a+7@pa7>t@?-X=||}R3h@RVh9v01{%PK_<jjxoZdAw-IBl)NcL?wxL-UDz7{Zt*C{6| zd>2gZ+(?OW?C1eXdg!K8$NhA~)x@8Gfhf(np5qkV=l;U!e(I9y>;+U5>40=NsMkWl zPRqC~R&+zM+kFyZ!a$Ztl-`h<`q*-YlvBu(me0hlDe>#GX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pyc b/__pycache__/paczka.cpython-311.pyc index edfa5ff380e5ac0041764a6df9fd3a728f3e998c..7807dfaea159606d46e29640e53bd87f2f08806c 100644 GIT binary patch delta 497 zcmaE=-(eEk1y1HXSbzv?5a9|WZt=#)C+8#<7bmCYV~6@_uGa+sw$A#>~nP%%I6Pxr(KLNmF$4TbAXM7qC8I zEZp46R=~*8!PUXFi9?l%M-`~Cm=Q=Q6zNPhXe;Bo-GZ zr{?6u$7?bcX#+*UE_Eo<0jXkz5o{odDj@NrfdK|TFv+q8F@9jcK{_xBvWk9SfD)5G zia7&aVk$0gXb&{z7F%&aQD#Z%Ew*4V4Yp||Ly<1XLXg$JIBatBQ%ZAE?TUOSw~Cv) cl`=BQe_+5)c7*lBUg1^z2$ueWLlM|)01}CAhyVZp diff --git a/__pycache__/wozek.cpython-311.pyc b/__pycache__/wozek.cpython-311.pyc index 406dafd25f29794a209f22189270ebe09a229eaa..bd1ce4491e21b3918df5e778be8259d5ae366662 100644 GIT binary patch delta 626 zcmexvy3&+yIWI340}xb(l%!+}ZRE4!ot)3Y$@v8+G@YS@fnjn1qweHF-hM{$$&7qj zo+%8$3?Qt@?DvuhsOF^+kkI6~#g~&=T;iV=keHmEn4Vf(qz@Fn#gdy?l5vZrxUi_C zh#M$SBo87KK!on(EquQ96+mVK!&d3GA~M*?@+ubX}zOlPyH49fD6G;Wzn$#1UO?R<#cd za6*QWmG=V!oDg7R)&9T$Cj=%Rl#FGxnJh1*Eae0;LJ~xPto+4clbfGXnv-f*lr%X; g$~&N#kz~n3Xj4^h>|aORDx{*07b#4?EnA( delta 720 zcmZ2!`rVXoIWI340}wpAS)6i9U?ZOuFCQC_%M8SyB^VhPrcaI+6K8Q@h^?92&fCvw zT*I({eX^pM@MJwc;mHYN;*&#!MJEdg@aZx#^wg#>1T$zd`@LiW>V9biBs4j1@#SO| zm-wdzBqnDkrl%I)Vgd0d=kh5q73ojz;`6QV0;+3ZxGS!DMO^Cx0}CgF=y1O)EI!3@ zM#`N0D{}f9)VF9}l(XKEcv05=fXNa2E6yPo!sD)lCtP$+xR9K3(JAGkY|2I9)GNZN z9WFQcg(nnsRdrO|5D>X8pm0e*VS)HX0nIA{nim8#?+VCW5m3G^pngd}9W2NX68-Uk z6K3(`VEz(DkI5(awK#VGT{fKo=wq;l>zM@DY8h)78=WVs2n6tCu>xhmU;!I6K&07= zq=6!u?2}guND0{hnMIl)K2wnxh;2Xll7Jyw0FYT6HknhpW_gc+?h@ zU*yrh!lQoyhCZ-QjudPY@&M`NMl!`?@<%~`#_-LKLaI!R(VNpnCNo)uffR*+3>y;LlB$mgQgV^!q@!6TFMWuP!rKy`u#7!8b96_pGK!h8J z5Csw8Ai{rglf)5SR#sq~zzIG^R^AT`a6*8U)c_<5CHN*6OU5$VPQECqEaeO`LJ~xP wob!vrCO1E&G$+-rD0woUly^WjBcm(h2L{|!hg*;D6&{6;5G7yms07;r02q72o&W#< diff --git a/ekran.py b/ekran.py index c009c34..a75ffa4 100644 --- a/ekran.py +++ b/ekran.py @@ -16,8 +16,10 @@ icon = pygame.image.load('images/icon.png') pygame.display.set_icon(icon) # lista_paczek = packageList.zainicjuj_liste_paczek(a_pix, b_pix) -lista_paczek = listOfPackages() +#lista_paczek = listOfPackages() +lista_paczek = [] +lista_paczek_na_regalach = [] def narysuj_regaly(): global lista_regalow @@ -69,6 +71,7 @@ def odswiez_ekran(wozek): screen.blit(miejsce,(a_pix, b_pix)) narysuj_siatke() narysuj_paczki(wozek) + narysuj_paczke_na_regale() narysuj_regaly() wozek.draw() pygame.display.flip() @@ -91,6 +94,13 @@ def sprawdz_ktora_kolumna(y): def narysuj_paczki(wozek): - if wozek.ln == 0: - for paczka in lista_paczek.list: - paczka.narysuj(paczka.x, paczka.y, screen) + #if wozek.ln == 0: + #for paczka in lista_paczek.list: + #if len(lista_paczek_na_regalach) == 0: + for paczka in lista_paczek: + paczka.narysuj(paczka.x, paczka.y, screen) + +def narysuj_paczke_na_regale(): + for paczka in lista_paczek_na_regalach: + if paczka.is_in_move is False: + paczka.narysuj(paczka.x, paczka.y, screen) \ No newline at end of file diff --git a/main.py b/main.py index 32bf3db..b08e673 100644 --- a/main.py +++ b/main.py @@ -8,17 +8,19 @@ from grid import GridCellType, SearchGrid from sklearn.tree import DecisionTreeClassifier import pandas as pd -from plansza import x1, y1, x2, y2, x3, y3, x4, y4, a_pix, b_pix +from plansza import a_pix, b_pix pygame.init() def main(): wozek = Wozek() - #paczka = Paczka('duzy', 12, 'narzedzia', False, True, False, any, any, any, any, any) - paczka = Paczka('maly', 1, 'ogród', False, True, False, any, any, any, any, any) - ekran.lista_paczek.add(paczka) - paczka.update_position(a_pix, b_pix) + p1 = Paczka('duzy', 12, 'narzedzia', False, True, False, any, any, any, any, any) + p2 = Paczka('maly', 1, 'ogród', False, True, False, any, any, any, any, any) + ekran.lista_paczek.append(p1) + ekran.lista_paczek.append(p2) + p1.update_position(a_pix, b_pix) + p2.update_position(a_pix, b_pix) grid_points = SearchGrid() @@ -42,11 +44,16 @@ def main(): if grid_points.grid[(wiersz, kolumna)] is GridCellType.PLACE: #picks up package if wozek.ln == 0: - wozek.load_package() - wozek.dynamic_wozek_picture + paczka_pop = ekran.lista_paczek.pop() + ekran.lista_paczek_na_regalach.append(paczka_pop) + paczka_pop.is_in_move = True + wozek.storage.append(paczka_pop) + wozek.ln = wozek.ln + 1 + wozek.dynamic_wozek_picture() + print(ekran.lista_paczek) ## wozek jedzie odlozyc paczke na regal - paczka1 = wozek.storage[0] + paczka1 = wozek.storage[-1] array, reg = paczka1.tablica_do_drzewa(paczka1.kategoria) @@ -82,14 +89,17 @@ def main(): sciezka = wyszukiwanie.znajdz_sciezke(wezel) wozek.przemiesc_wozek_po_sciezce(sciezka) - # print(wozek.storage) if wozek.ln != 0: # drops package - wozek.drop_package() + print(paczka1) + paczka1.update_position(reg.numerWiersza*70, reg.numerKolumny*70) + paczka_pop.is_in_move = False + wozek.storage.pop() + wozek.ln = wozek.ln - 1 reg.put_package_on_the_regal(paczka1, predictions) wozek.dynamic_wozek_picture() + ekran.odswiez_ekran(wozek) - - if event.type == pygame.MOUSEBUTTONDOWN: + if event.type == pygame.MOUSEBUTTONDOWN: # lewy przycisk myszy if event.button == 1: x = pygame.mouse.get_pos()[0] diff --git a/paczka.py b/paczka.py index f59a55b..71ea4a6 100644 --- a/paczka.py +++ b/paczka.py @@ -34,6 +34,7 @@ class Paczka(pygame.sprite.Sprite): self.x = 430 self.y = 400 self.label = Etykieta(nadawca, adres, imie, nazwisko, telefon, priorytet) + self.is_in_move = False # zmienia rozmiar obrazka w zaleznosci od rozmiaru def __dobierz_rozmiar_obrazka(self): diff --git a/wozek.py b/wozek.py index 867e5d1..27f4dca 100644 --- a/wozek.py +++ b/wozek.py @@ -63,11 +63,18 @@ class Wozek(pygame.sprite.Sprite): def load_package(self): - for package in listOfPackages.list: - dist = math.sqrt((self.obecnyStan.x - package.x)**2 + (self.obecnyStan.y - package.y)**2) - if dist <= 50: - self.add_element(package) - listOfPackages.list.pop() + #for package in listOfPackages.list: + # for package in listOfPackages: + # dist = math.sqrt((self.obecnyStan.x - package.x)**2 + (self.obecnyStan.y - package.y)**2) + # if dist <= 50: + # self.add_element(package) + # # listOfPackages.list.pop() + # listOfPackages.pop() + package = listOfPackages.pop() + dist = math.sqrt((self.obecnyStan.x - package.x)**2 + (self.obecnyStan.y - package.y)**2) + if dist <= 50: + self.add_element(package) + # listOfPackages.list.pop() def load_packages_collision(self): pass @@ -82,7 +89,8 @@ class Wozek(pygame.sprite.Sprite): if package is not None: package.x = self.obecnyStan.x package.y = self.obecnyStan.y - listOfPackages.list.append(package) + # listOfPackages.list.append(package) + listOfPackages.append(package) def __zainicjuj_stan_poczatkowy(self): from wyszukiwanie import Stan -- 2.20.1 From 5341f5330b22bfeaf14b4f3635f5f170eee200f4 Mon Sep 17 00:00:00 2001 From: s473561 Date: Mon, 29 May 2023 11:15:06 +0200 Subject: [PATCH 5/5] metody: picks_up_package() i drops_package() --- DecisionTree/drzewo_decyzyjne.py | 30 +++++ __pycache__/wozek.cpython-311.pyc | Bin 6825 -> 7918 bytes main.py | 21 +--- training_data.txt | 200 ++++++++++++++++++++++++++++++ wozek.py | 14 +++ 5 files changed, 249 insertions(+), 16 deletions(-) create mode 100644 training_data.txt diff --git a/DecisionTree/drzewo_decyzyjne.py b/DecisionTree/drzewo_decyzyjne.py index 6d4842d..add9cfe 100644 --- a/DecisionTree/drzewo_decyzyjne.py +++ b/DecisionTree/drzewo_decyzyjne.py @@ -3,6 +3,36 @@ import pandas as pd from sklearn.tree import DecisionTreeClassifier from sklearn.tree import export_graphviz +# def make_tree(): +# plikZPrzecinkami = open("training_data.txt", 'w') + +# with open('DecisionTree/200permutations_table.txt', 'r') as plik: +# for linia in plik: +# liczby = linia.strip() +# wiersz = "" +# licznik = 0 +# for liczba in liczby: +# wiersz += liczba +# wiersz += ";" +# wiersz = wiersz[:-1] +# wiersz += '\n' +# plikZPrzecinkami.write(wiersz) + +# plikZPrzecinkami.close() + +# x = pd.read_csv('DecisionTree/training_data.txt', delimiter=';', +# names=['wielkosc', 'waga,', 'priorytet', 'ksztalt', 'kruchosc', 'dolna', 'gorna', 'g > d']) +# y = pd.read_csv('DecisionTree/decisions.txt', names=['polka']) +# # X_train, X_test, y_train, y_test = train_test_split(x, y, test_size=0.3, random_state=1) # 70% treningowe and 30% testowe + +# # Tworzenie instancji klasyfikatora ID3 +# clf = DecisionTreeClassifier(criterion='entropy') + +# # Trenowanie klasyfikatora +# clf.fit(x.values, y.values) +# # clf.fit(X_train, y_train) +# return clf + plikZPrzecinkami = open("training_data.txt", 'w') with open('200permutations_table.txt', 'r') as plik: diff --git a/__pycache__/wozek.cpython-311.pyc b/__pycache__/wozek.cpython-311.pyc index bd1ce4491e21b3918df5e778be8259d5ae366662..21f255cb87c624505e12b8cbc412f445b8502bf6 100644 GIT binary patch delta 1067 zcmZ{iOKTHR6vt;KuS1%QY153;w5BP<#!zC>)Z8VrU1+gTl_6w?Ht%pJ5gQ^Y z(nZj2$_VYUE3LRG2#PyDLJ~$2f(1W-h@v0Bb0?ih)t(Ih%z55B_jg}k`gWOr<#sz6 zw3T#Gem=O(@3YUg->(ZYzsan4&Pl7hb3brrUvZF~tRP%T| ze34E#vXn);*%#0zd2c^kVI`XxuP`b5QD&fuj>AmITp3?0jPxhM;9{1=C2|%M5g;S@ zM=Vq(Q95EKsTSi>A)Y8JX(<<%h_V{b#1m^ILetKqDkXDLHvdQ==V;S7N`xbVk)&Pe zDt6}!Du`1! z68$&57|X~UqM_3aLmE~s;|U;3KExu5l-*3pmNH%sgwu;uxIG75xr$q;SpFGI(ODM> z?u(f>`AwnIapg)`g)Ao(qL$-F-mQG5l+CS^hgi^MMFAVYI%1(zG+9XboK##>x}YOg z17)>iH(16y7UbXQD-cCaCW^^?PF3l-1<|@_-7-Pg=B%=}%k@}r6C2bl$_CR0z6F6M z1a?(@bn<{}j9xsrs!w10c&9OaqX97;Vs(hMM;69vb{&SgKtXJR*Z{u{{yO-N(QHFs z3qnl@?cLkI-@6ZZCGasQM+B{3EINopKYdkuDo(L}?Vb4bLeORld}n&X+ibJcJz2C5 nLrcy)j-mHK-Ox_^uguSJEH?aKYx7&Tbyx6*k^Xf;k+H|$lP?S3 delta 184 zcmaE7yV8_zIWI340}xb(l%!+}P2^j_ST}KdC07SS1!I(OFoP!FW;e#GVoaJMlWk;5 zChw9lU}Tv5TIP*710Sm^;|C0KGKX9UR}#=XMj$Tknw%!*6j02_2vUlh>Tv7vy~3mL O5u)S^9+gFsKw|+~`Yn+F diff --git a/main.py b/main.py index b08e673..7c4ee17 100644 --- a/main.py +++ b/main.py @@ -44,18 +44,13 @@ def main(): if grid_points.grid[(wiersz, kolumna)] is GridCellType.PLACE: #picks up package if wozek.ln == 0: - paczka_pop = ekran.lista_paczek.pop() - ekran.lista_paczek_na_regalach.append(paczka_pop) - paczka_pop.is_in_move = True - wozek.storage.append(paczka_pop) - wozek.ln = wozek.ln + 1 + wozek.picks_up_package() wozek.dynamic_wozek_picture() - print(ekran.lista_paczek) - + ## wozek jedzie odlozyc paczke na regal - paczka1 = wozek.storage[-1] + przenoszona_paczka = wozek.storage[-1] - array, reg = paczka1.tablica_do_drzewa(paczka1.kategoria) + array, reg = przenoszona_paczka.tablica_do_drzewa(przenoszona_paczka.kategoria) plikZPrzecinkami = open("DecisionTree/training_data.txt", 'w') @@ -90,14 +85,8 @@ def main(): wozek.przemiesc_wozek_po_sciezce(sciezka) if wozek.ln != 0: # drops package - print(paczka1) - paczka1.update_position(reg.numerWiersza*70, reg.numerKolumny*70) - paczka_pop.is_in_move = False - wozek.storage.pop() - wozek.ln = wozek.ln - 1 - reg.put_package_on_the_regal(paczka1, predictions) + wozek.drops_package(przenoszona_paczka, reg, predictions) wozek.dynamic_wozek_picture() - ekran.odswiez_ekran(wozek) if event.type == pygame.MOUSEBUTTONDOWN: # lewy przycisk myszy diff --git a/training_data.txt b/training_data.txt new file mode 100644 index 0000000..06a4ff8 --- /dev/null +++ b/training_data.txt @@ -0,0 +1,200 @@ +1;0;0;1;0;0;1;0 +0;0;1;0;1;1;0;1 +2;0;1;1;0;0;0;1 +2;2;1;0;1;1;1;0 +1;0;0;1;0;0;0;1 +2;1;0;0;1;1;0;0 +1;0;0;0;1;0;0;1 +1;1;0;1;0;0;0;1 +0;0;1;0;1;1;1;0 +0;2;0;0;0;1;1;0 +0;0;1;0;0;1;0;1 +0;0;0;0;0;1;1;0 +0;2;1;0;1;1;0;0 +2;0;0;0;1;0;0;0 +2;1;0;1;0;1;1;1 +0;1;1;0;1;1;1;0 +0;2;0;1;1;1;0;1 +1;2;1;0;1;1;0;0 +0;0;1;1;1;1;0;1 +0;0;0;1;1;0;0;1 +1;1;1;1;1;0;1;0 +1;2;1;0;0;1;1;1 +2;2;1;1;0;1;1;1 +1;2;1;0;1;1;0;1 +0;1;0;0;0;1;0;1 +1;1;0;0;0;1;0;1 +0;1;0;0;0;1;1;1 +2;1;0;1;0;1;0;1 +0;1;1;0;1;1;0;0 +2;1;0;1;0;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;1;1;1;1;0;1;1 +1;0;1;1;0;0;1;1 +1;0;0;1;1;0;0;1 +2;1;1;1;0;0;1;0 +1;0;0;0;0;0;0;0 +0;0;0;1;1;1;1;0 +1;0;1;1;0;0;0;1 +2;1;1;1;1;0;1;1 +1;2;0;1;0;1;0;1 +1;1;0;0;0;1;1;0 +2;2;1;0;1;1;0;1 +0;0;0;0;0;0;1;0 +0;2;0;0;0;1;1;1 +2;1;0;0;0;0;1;1 +0;0;0;1;1;1;0;0 +1;0;1;0;0;1;1;0 +2;0;0;0;1;1;1;1 +1;2;1;0;0;0;0;1 +2;2;0;0;0;1;0;1 +0;1;1;0;0;0;1;0 +0;2;0;0;1;0;1;0 +1;1;0;0;1;1;1;1 +0;0;0;1;0;0;1;1 +0;1;1;0;0;1;1;1 +2;2;0;1;1;0;1;0 +1;0;1;0;1;0;1;1 +1;1;0;1;0;0;1;1 +2;0;1;1;0;0;1;0 +2;0;1;0;0;0;1;0 +1;1;1;1;0;1;1;1 +2;1;1;0;1;0;0;0 +0;2;0;1;1;0;0;0 +1;2;1;1;0;1;0;0 +2;1;1;1;1;1;0;1 +0;2;0;1;0;1;1;1 +0;2;1;0;1;0;0;1 +0;1;1;0;0;0;1;1 +1;0;0;1;1;0;1;1 +2;2;1;1;0;0;0;0 +0;1;1;0;0;0;0;0 +2;0;1;1;0;1;0;0 +0;1;1;0;0;0;0;1 +0;0;1;1;1;0;1;0 +0;2;0;0;0;0;1;0 +2;0;0;1;0;1;1;0 +0;0;1;0;1;0;1;1 +2;2;0;0;1;0;1;1 +2;2;0;1;0;0;0;1 +2;2;0;1;0;1;0;1 +1;2;1;0;0;1;0;1 diff --git a/wozek.py b/wozek.py index 27f4dca..6965b98 100644 --- a/wozek.py +++ b/wozek.py @@ -121,4 +121,18 @@ class Wozek(pygame.sprite.Sprite): # obrot w lewo else: self.image = pygame.transform.rotate(self.image, 90) + + def picks_up_package(self): + paczka_pop = ekran.lista_paczek.pop() + ekran.lista_paczek_na_regalach.append(paczka_pop) + paczka_pop.is_in_move = True + self.storage.append(paczka_pop) + self.ln = self.ln + 1 + + def drops_package(self, paczka, reg, predictions): + paczka.update_position(reg.numerWiersza*70, reg.numerKolumny*70) + paczka.is_in_move = False + self.storage.pop() + self.ln = self.ln - 1 + reg.put_package_on_the_regal(paczka, predictions) -- 2.20.1