fix: ziemniaki problem

Added more examples to the learning set of decision tree.
This commit is contained in:
Adam Mikolajczak 2024-06-10 14:34:38 +02:00
parent 1856cd5fca
commit e053757bcf
2 changed files with 9 additions and 3 deletions

View File

@ -97,9 +97,6 @@ class Tile(pygame.sprite.Sprite):
result = classes[predicted.item()] result = classes[predicted.item()]
if result == "ziemniak":
result = 'marchew'
return result return result

View File

@ -222,3 +222,12 @@ grass,10,no_plant,marchew,dynia,grass,water,plant(seler)
grass,10,no_plant,water,dynia,cebula,cebula,plant(seler) grass,10,no_plant,water,dynia,cebula,cebula,plant(seler)
grass,10,no_plant,ogórek,dynia,cebula,grass,plant(seler) grass,10,no_plant,ogórek,dynia,cebula,grass,plant(seler)
grass,10,no_plant,szpinak,dynia,fasola,grass,plant(seler) grass,10,no_plant,szpinak,dynia,fasola,grass,plant(seler)
ziemniak,40,planted,water,grass,szpinak,grass,move
ziemniak,50,grown,szpinak,szpinak,grass,grass,move
ziemniak,10,planted,water,ziemniak,seler,water,move
ziemniak,20,planted,szpinak,szpinak,grass,seler,move
ziemniak,30,planted,grass,water,ziemniak,grass,move
ziemniak,40,planted,growing,grass,grass,burak,move
ziemniak,50,grown,growing,szpinak,water,grass,move
ziemniak,10,planted,growing,water,szpinak,marchew,move
ziemniak,20,planted,growing,szpinak,grass,kapusta,move

1 tile_type water_level plant_stage neighbor_N neighbor_E neighbor_W neighbor_S action
222 grass 10 no_plant water dynia cebula cebula plant(seler)
223 grass 10 no_plant ogórek dynia cebula grass plant(seler)
224 grass 10 no_plant szpinak dynia fasola grass plant(seler)
225 ziemniak 40 planted water grass szpinak grass move
226 ziemniak 50 grown szpinak szpinak grass grass move
227 ziemniak 10 planted water ziemniak seler water move
228 ziemniak 20 planted szpinak szpinak grass seler move
229 ziemniak 30 planted grass water ziemniak grass move
230 ziemniak 40 planted growing grass grass burak move
231 ziemniak 50 grown growing szpinak water grass move
232 ziemniak 10 planted growing water szpinak marchew move
233 ziemniak 20 planted growing szpinak grass kapusta move