forked from s452751/AI_PRO
FINAL
This commit is contained in:
parent
e8db800831
commit
809ab043b7
@ -4,14 +4,14 @@
|
||||
from math import ceil, floor
|
||||
|
||||
DISPLAY_SIZE_HORIZONTAL = 1600
|
||||
DISPLAY_SIZE_VERTICAL = 1000
|
||||
DISPLAY_SIZE_VERTICAL = 800
|
||||
|
||||
#TILE DIVIDER = TILE SIZE
|
||||
TILE_SIZE = 100
|
||||
|
||||
# number of tiles
|
||||
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
|
||||
|
||||
|
@ -37,6 +37,3 @@ dict = {
|
||||
'beetroots': training_data_beetroot,
|
||||
'potatoes': training_data_potatoes
|
||||
}
|
||||
|
||||
print(dict)
|
||||
np.save(os.path.join('neural_network','dataset'), np.array(dict))
|
10
drawUI.py
10
drawUI.py
@ -29,21 +29,21 @@ def drawInfo(display, tractor, tillageUnit, field, direction, weather, day_time,
|
||||
else:
|
||||
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))
|
||||
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}"
|
||||
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}"
|
||||
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}"
|
||||
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):
|
||||
|
Loading…
Reference in New Issue
Block a user