This commit is contained in:
secret_dude 2021-06-22 23:12:13 +02:00
parent e8db800831
commit 809ab043b7
3 changed files with 7 additions and 10 deletions

View File

@ -4,14 +4,14 @@
from math import ceil, floor from math import ceil, floor
DISPLAY_SIZE_HORIZONTAL = 1600 DISPLAY_SIZE_HORIZONTAL = 1600
DISPLAY_SIZE_VERTICAL = 1000 DISPLAY_SIZE_VERTICAL = 800
#TILE DIVIDER = TILE SIZE #TILE DIVIDER = TILE SIZE
TILE_SIZE = 100 TILE_SIZE = 100
# number of tiles # number of tiles
HORIZONTAL_TILES_NUMBER = floor((DISPLAY_SIZE_HORIZONTAL)/TILE_SIZE) HORIZONTAL_TILES_NUMBER = floor((DISPLAY_SIZE_HORIZONTAL)/TILE_SIZE)
VERTICAL_TILES_NUMBER = floor((DISPLAY_SIZE_VERTICAL-400)/TILE_SIZE) VERTICAL_TILES_NUMBER = floor((DISPLAY_SIZE_VERTICAL-200)/TILE_SIZE)
#TILE_SIZE #TILE_SIZE

View File

@ -37,6 +37,3 @@ dict = {
'beetroots': training_data_beetroot, 'beetroots': training_data_beetroot,
'potatoes': training_data_potatoes 'potatoes': training_data_potatoes
} }
print(dict)
np.save(os.path.join('neural_network','dataset'), np.array(dict))

View File

@ -29,21 +29,21 @@ def drawInfo(display, tractor, tillageUnit, field, direction, weather, day_time,
else: else:
decision = "Make Action" decision = "Make Action"
text = f"(Q)Hitches: {hitches} (W)Header: {tractor.header} (R)Engine working: {tractor.engineWorking} (T)Autodrive: {tractor.autodrive} Fuel: {tractor.fuel_tank}" text = f"(Q)Hitches: {hitches} (W)Header: {tractor.header} (R)Engine working: {tractor.engineWorking} (T)Autodrive: {tractor.autodrive} Fuel: {round(tractor.fuel_tank,1)}"
textsurface = myfont.render(text, False, (0, 0, 0)) textsurface = myfont.render(text, False, (0, 0, 0))
display.blit(textsurface, (50, (DISPLAY_SIZE_VERTICAL - 400))) display.blit(textsurface, (50, (DISPLAY_SIZE_VERTICAL - 200)))
text = f"(E)Tillage Unit Load: {tillageUnit.load} (^) Direction: {direction}" text = f"(E)Tillage Unit Load: {tillageUnit.load} (^) Direction: {direction}"
textsurface = myfont.render(text, False, (0, 0, 0)) textsurface = myfont.render(text, False, (0, 0, 0))
display.blit(textsurface, (50, (DISPLAY_SIZE_VERTICAL - 350))) display.blit(textsurface, (50, (DISPLAY_SIZE_VERTICAL - 150)))
text = f"Current field: {field.horizontal_index/100, field.vertical_index/100, field.state} Action: {decision}" text = f"Current field: {field.horizontal_index/100, field.vertical_index/100, field.state} Action: {decision}"
textsurface = myfont.render(text, False, (0, 0, 0)) textsurface = myfont.render(text, False, (0, 0, 0))
display.blit(textsurface, (50, (DISPLAY_SIZE_VERTICAL - 300))) display.blit(textsurface, (50, (DISPLAY_SIZE_VERTICAL - 100)))
text = f"Weather: {weather} Day Time: {day_time} Temperature: {temperature} Wind: {wind} Humidy: {humidy}" text = f"Weather: {weather} Day Time: {day_time} Temperature: {temperature} Wind: {wind} Humidy: {humidy}"
textsurface = myfont.render(text, False, (0, 0, 0)) textsurface = myfont.render(text, False, (0, 0, 0))
display.blit(textsurface, (50, (DISPLAY_SIZE_VERTICAL - 250))) display.blit(textsurface, (50, (DISPLAY_SIZE_VERTICAL - 50)))
def makeField(board, screen: pygame.Surface): def makeField(board, screen: pygame.Surface):