Sunflowers are my BEST Python-Automated Crop

Ойындар

Program and optimize a drone to automate a farm and watch it do the work for you. Collect resources to unlock better technology and become the most efficient farmer in the world. Improve your problem solving and coding skills.
Check out The Farmer was Replaced here:
-- store.steampowered.com/app/20...
Check out my Python tutorials:
• VARIABLES, TYPES, AND ...
#games #olexa #strategy #farming #automation #programming
Thanks for watching!
-- Extra Olexa Content - / @olexa2
-- Discord: / discord
-- Twitch: / olexastream
-- Twitter: / olexayt
-- Reddit: / olexa
-- My Nexus Gamestore: www.nexus.gg/olexa
-- KZread: / olexayt
-- Business Email: olexakid@gmail.com
-- Join this channel to get access to perks:
/ @olexayt
Music I Use:
-- www.bensound.com/free-music-f...
-- Spring by Ikson
-- Harris Heller Streambeats Lofi Spring by Ikson | ikson.com/tell-your-story
Music promoted by www.free-stock-music.com

Пікірлер: 263

  • @modshowcase775
    @modshowcase775Ай бұрын

    What up with the goto function at 12:50 - 14:21 ? Seems like it wasn't needed

  • @OlexaYT

    @OlexaYT

    Ай бұрын

    Oh oops. Editing error on my part. Left over from the previous video. Sorry about this everyone!

  • @cjhansen8969

    @cjhansen8969

    Ай бұрын

    @@OlexaYTI forgive you Tyler don’t worry

  • @nimajneb8897
    @nimajneb8897Ай бұрын

    This whole game has been super satisfying, but watching you perfect the sunflowers was ESPECIALLY satisfying!

  • @apophys1110
    @apophys1110Ай бұрын

    Fun fact: you can measure the sunflower's petals before it's fully grown. That means you can generate the petals list immediately on the planting loop, without needing to scan through a second one. Also, when you harvest the biggest sunflower, you can immediately replant, measure it, add it into your data, and run the program for hundreds of iterations at once, each time getting the maximum power from one flower harvest. If it runs long enough, eventually all sunflowers have 7 petals except possibly for the one you replant, so that's a potential use case for fertilizer to spam farm a single tile (probably overkill for power at that point though). It's interesting to see the strategy you used for the internal data, because it's completely different to mine - I make a 3D array, storing flower coordinates indexed by their measured petal count. As the data is built up, it is structured in a way that naturally orders the flowers by their petals, so I don't need to use the max() function at all; I just go to harvest one from the last category. When I replant, I insert the new flower in the structure where it fits, and carry on. Here's my code, for anyone interested. As utility functions, buy() is my custom trade up to a desired threshold, cut() is my custom lossless harvest, irrigate() is my custom watering up to a desired threshold. def Sunflowers(REPEATS): size = get_world_size() buy(Items.Sunflower_Seed, size ** 2 + REPEATS) # generate 3D data structure, of positions indexed by petal count Data = [] for i in range(size): for i in range(size): if get_ground_type() == Grounds.Turf: till() if get_entity_type() != Entities.Sunflower: cut() plant(Entities.Sunflower) irrigate(1) petals = measure() while len(Data) 0: biggest = len(Data) - 1 goto(Data[biggest][0][0], Data[biggest][0][1]) Data[biggest].pop(0) cut() plant(Entities.Sunflower) irrigate(1) petals = measure() while len(Data)

  • @MrGedem

    @MrGedem

    Ай бұрын

    Well, sitting in one place and growing sunflower with fertilizer is the fastest way to collect power, but it eats too much fertilizer. Second best for me was stupid scanning field. It makes more power in 1 min that smarter finding way to the biggest petal. My code is: need_power(num_items(Items.Power)+50000) def need_power(power): while num_items(Items.Power)0: # collecting part for x_coord in range(get_world_size()): for y_coord in range(get_world_size()): i = (get_world_size() * x_coord + y_coord) if y_coord == 0: # check for skipping line this_line_pedals = [] for t in range(get_world_size()): this_line_pedals.append(pedals[i+t]) if max(pedals) > max(this_line_pedals): move(East) # there is no max petals, skipping line break elif max(this_line_pedals) == 0: move(East) # there is no sunflowers at all break if pedals[i] == max(pedals): harvest() pedals.pop(i) pedals.insert(i, 0) # not messing pedals index if y_coord == (get_world_size()-1): move(East) move(North) else: move(North)

  • @SlyStorm-kj9wh

    @SlyStorm-kj9wh

    Ай бұрын

    could you explain what a lossless harvest is? im assuming time but im not 100% on it. and how exactly is your list working? as far as i can tell its storing multiple X,Y data on one number like a key in a dict? but it storing all positions of that number of petal in one entry isnt something ive seen before this might be worded horribly, sorry, but im only intermediate (at best) at programming and this game is interesting enough to give a push, so id appreciate any explaination youre willing to give

  • @apophys1110

    @apophys1110

    Ай бұрын

    @@SlyStorm-kj9wh 1. The base function harvest() will just destroy the crop underneath if it isn't fully grown, wasting all the time spent growing up to that point, so my custom function waits over the crop until it's grown, before harvesting. I first need to make it check that something exists to wait for, otherwise it could get stuck waiting on an empty square. This custom function can be safely called in any board situation, and so I use it in every farming program: def cut(): if get_entity_type() != None: while True: if can_harvest(): harvest() break 2. For the data storage: it's a list of lists of lists. I.e., it's 3-dimensional. You can have lists being individual elements in other lists. List inception. :P Think of it like a cabinet with shelves, and folders in the shelves, with each folder containing 2 sheets of paper for a coordinate pair. The base list named Data is the entire cabinet. Each shelf, Data[a], has an index 'a' on the cabinet (for petal count). Each shelf is its own list. Each folder Data[a][b] has an index 'b' in the shelf's list (for the chronological order of being placed inside). It is also a list itself, containing 2 elements (the x & y values, Data[a][b][c] for c = 0 or 1, respectively). So, the y value of the 3rd oldest flower added with 7 petals is at Data[7][2][1] , 7 for the 8th shelf, 2 for the 3rd folder from the front, and [1] for its y coordinate. The cabinet starts as an empty list, with no shelves. Upon measuring a flower to add into it, the very first thing that needs to be done is to add empty shelves to the cabinet, from the bottom up, to have a correct shelf to put the folder into. Each time a flower has more petals than the cabinet has shelves, the cabinet needs to be expanded upwards. Then, a folder needs to be placed into the petals shelf. This folder is a newly created list, containing as its elements the present x value and the present y value. After all flowers have been added, the total number of shelves is the length of the list Data. The ones with the most petals are simply the ones in the top shelf of Data[biggest]. I pull out the oldest one, Data[biggest][0] ; since append() adds to the end of a list, the 0 index of that list is always the oldest. Harvest, replant, add new flower's data, expand cabinet if needed as previously. If the harvested flower was the last one in its shelf, and its replanted replacement has fewer petals, the top shelf is now empty. So a new check for the biggest flower would fail. In this case, we need to shrink the cabinet by trimming empty shelves from the top until we find one that isn't empty (which we are guaranteed to, because we just planted one somewhere). Then this process can be repeated as many times as you like, with a continuously morphing cabinet. Eventually, after hundreds of iterations, the shelf Data[7] becomes very full, because 7 is the fewest petals a flower can spawn with, and those are left alone until the very end. The shelves of Data[0] through Data[6] are all empty, always. If I wanted to save a couple calculations in the beginning, I could have initialized Data to start with 8 empty shelves instead, as Data = [[], [], [], [], [], [], [], []] That is a full step by step explanation of what my code is doing.

  • @apophys1110

    @apophys1110

    Ай бұрын

    @@SlyStorm-kj9wh A worked example should help illustrate, actually: Suppose we have a 2x2 grid. The flowers on this grid have 7, 10, 8, and 7 petals. The drone is told to only repeat for one loop. 1. Drone starts at (0,0) and measures 7. Data = [ [], [], [], [], [], [], [], [ [0, 0] ] ] 2. Drone goes to (0, 1) and measures 10. Data = [ [], [], [], [], [], [], [], [ [0, 0] ], [], [], [ [0, 1] ] ] 3. Drone goes to (1, 0) and measures 8. Data = [ [], [], [], [], [], [], [], [ [0, 0] ], [ [1, 0] ], [], [ [0, 1] ] ] 4. Drone goes to (1, 1) and measures 7. Data = [ [], [], [], [], [], [], [], [ [0, 0], [1, 1] ], [ [1, 0] ], [], [ [0, 1] ] ] 5. Data has a length of 11, so drone goes to entry Data[10][0] to harvest, whose coordinates are [0, 1]. Data = [ [], [], [], [], [], [], [], [ [0, 0], [1, 1] ], [ [1, 0] ], [], [] ] It replants and measures 7. Data = [ [], [], [], [], [], [], [], [ [0, 0], [1, 1], [0, 1] ], [ [1, 0] ] ] Data now has a length of 9, trimmed since the 10 index was made empty, and the 9 index never had anything in it. 6. Drone is done, and resets its position to (0, 0).

  • @SlyStorm-kj9wh

    @SlyStorm-kj9wh

    Ай бұрын

    @@apophys1110 i think i get it now, or at least understand enough to try and replicate it and understand it more, thank you for such a detailed explaination :)

  • @hityde97
    @hityde97Ай бұрын

    These videos got me to buy the game and start learning coding

  • @AndrewArdill
    @AndrewArdillАй бұрын

    Didn’t see anyone mention it yet, but lists of tuples are sorted by each tuple’s items, in order. So if you store a list of (petals, coords) and then ask for the max of it you will get back something like (15, (2, 5)). This avoids keeping track of things separately.

  • @necrominer3518
    @necrominer3518Ай бұрын

    Just want to start with saying that I have really been enjoying this series and you're doing a great job at it. I don't know if this is still the case, but you used to be able to call measure() on a freshly planted sunflower before it is fully grown, so on your first loop over the farm you can already be populating the list of petals. This would save a full traverse reading all of the measures. This also would let you replant and measure the new sunflower as soon as you harvest one, again saving a trip around the farm.

  • @OlexaYT

    @OlexaYT

    Ай бұрын

    Oh interesting. Yeah that would save one passthrough

  • @Anson_AKB

    @Anson_AKB

    Ай бұрын

    with the large size of the entire field (and the correspondingly large time to finish the pass), you probably don't need to water tiles most of the time. that saves doing the extra checks, the watering, and in the beginning also the growing of lots of wood for buying lots of empty buckets. in the next video you might be doing the fertilizer, which would be helpfull to quickly grow those few plants that were recently (re)planted and didn't fully grow yet until you want to harvest them. even with water it might take a short time, especially when always replanting sunflowers that then might be the only one with the largest number of petals. when doing a full pass for replanting, i always saw some sunflowers with a low number of petals being leftover and those tiles not being replanted. harvesting them too or deleting them (eg by planting and harvesting "wrong sunflowers") might be beneficial to be able to replant those tiles and get flowers with more petals on those tiles too. in my current game, i think that immediately replanting each harvested flower, measuring it and storing it in a sorted array of petalnumbers, and going directly to the next harvestable flower from that array (instead of doing lots of full passes) is more effective to always get the max number of power.

  • @Luwuci

    @Luwuci

    Ай бұрын

    @@Anson_AKB The tiles that have 'low petal count' are essentially just fodder for the high petal counts. you gain no more or no less power for having low petal counts, as all that matters is the total count of the flowers themselves not the combined petal count of the flowers.

  • @Kraus-

    @Kraus-

    Ай бұрын

    @@Anson_AKB The tutorial seems to say that the number of petals doesn't matter for the yield. That would mean leaving the small flowers is an increase in efficiency.

  • @Anson_AKB

    @Anson_AKB

    Ай бұрын

    @@Kraus- to make it more easily visible, let's assume that you have almost only 7-petal flowers (flowers have 7-15 petals) and only very few (a handfull of) flowers have more petals. then harvesting one of these many-petal flowers and replanting it will almost certainly get you another multi-petal flower or rarely another 7-petal flower. then for any of these few flowers (that may be scattered all over the field) that you harvest and replant you get a new one with most probably more than 7 petals. now the only few flowers that you may harvest are those newly planted flowers which in turn forces you to move a lot back and forth between them (costing time and using power) and also most often wait for those specific flowers to do their entire growth (can be shortened by fertilizing but that then costs pumpkins [and in turn replanting the entire field for carrots and pumpkins, and also a full planting pass for sunflowers afterwards] and fertilizer) before harvesting them. overall, having lots of the 15-, 14-, 13-, etc-petal flowers would allow to harvest and replant more in a single pass over almost the entire field, and quite often not needing watering or fertilizing them to get back to a fully grown flower for harvesting and replanting. thus i have implemented some "cutoff" limit for the number of petals and when there are no more flowers above that limit, i clean the field, do an entire planting pass for all tiles (using for x and for y, instead of many slower goto), and start over. the worst probably were those medium cases with lots of 7,8,9,etc petals and none of 15,14,13,etc petals (low total power when doing passes over the entire field without replanting immediately, and lots of waiting for a specific flower to grow when doing "harvest and replant" for each one).

  • @philipp9633
    @philipp9633Ай бұрын

    Small tip: at 25:46 instead of moving the lines back one by one, you can mark them and press shift + tab

  • @DatBoiWitDaz06

    @DatBoiWitDaz06

    Ай бұрын

    Doesn't work for me, triggers the steam overlay and deletes the lines :( was disappointed when I tried it

  • @philipp9633

    @philipp9633

    Ай бұрын

    Damn didnt think about that, i hope ctrl z worked xD

  • @Muflonssi

    @Muflonssi

    Ай бұрын

    @@DatBoiWitDaz06 I disabled Steam ovelay for this game for that reason

  • @Chihuaha

    @Chihuaha

    Ай бұрын

    @@DatBoiWitDaz06 yea same you have to go into the steam settings and change the key command for the overlay

  • @kevincornell2811
    @kevincornell2811Ай бұрын

    I can't wait for Olexa to get to Mazes. I love maze algorithms and I want to see how he does it

  • @OlexaYT

    @OlexaYT

    Ай бұрын

    You are NOT going to be happy lmao

  • @jayr0x

    @jayr0x

    Ай бұрын

    ​@@OlexaYT he might not be happy, but I will :)

  • @myclamish

    @myclamish

    Ай бұрын

    Yeah I wasn't expecting to have to code one when I started lol. Fortunately I just spent like 10 minutes throwing up a basic wall hugging traversal and that was good enough for idling it. At some point I'd like to create a real mapping + backtracking one so I can actually do the mazes with loops. Will be interesting to see what Olexa tries first.

  • @MindCaged

    @MindCaged

    Ай бұрын

    @@myclamish Yeah I'd love to see somebody do that since my coding skills and experience leave me with little to no idea how to do that other than assuming it'd involve making a map with arrays, how it would handle the map changing and a random wall being removed i'm not sure, unless it just blindly follows the original map even after walls are removed, which might not be the most efficient, though it would at least eliminate taking wrong paths perhaps. The only thing I can think of is having it recheck every wall it remembers being there every time it moves, though if it does find an opening it'd have to record it and recalculate it's path. I can see it getting rather complicated. Frankly, I just found it orders of magnitude simpler to not bother and just stick with the basic code being run at extremely fast speed, since re-using the maze only increases the payout by 1 times each time, and you still need to solve the maze only it's doing it virtually instead of live. At max speed it can solve each maze in seconds.

  • @myclamish

    @myclamish

    Ай бұрын

    @MindCaged yeah I was also thinking if you just do a basic traversal algorithm and just map the whole maze in memory before solving it once, it would be faster to just keep using what's stored than trying to work out any new paths especially since the bot doesn't know where the goal is

  • @satibel
    @satibelАй бұрын

    I think you can check num petals while planting, also you could replant just the sunflowers you harvested instead of scanning the whole grid and I'm not sure if the way the list is constructed is actually the most efficient. (probably efficient enough, but shortest path to next isn't always the shortest overall path between multiple points.)

  • @ryanmcmanus7273

    @ryanmcmanus7273

    Ай бұрын

    You can measure directly after.

  • @ingiford175
    @ingiford175Ай бұрын

    For sunflowers, I think you can measure them just after you plant them, before they grow, so you can do one less pass

  • @lewhayberg8839
    @lewhayberg8839Ай бұрын

    I've been diggin' this mini series. I've been wanting to get into code for Network Automation and this has been really fun and helpful!

  • @cubondemais
    @cubondemaisАй бұрын

    For the maze, since the drone has to go to a place to explore something and the BFS algorithm has a lot of backtracking, the drone ends up having to move much more than in a DFS algorithm and that makes BFS slower than DFS in this case.

  • @Vaaaaadim

    @Vaaaaadim

    Ай бұрын

    That's why for my solution I explore the whole maze first, run BFS on a simulated maze, and then use the path BFS came up with for actually moving.

  • @helicoidcyme
    @helicoidcymeАй бұрын

    what fun! in a theoretical endgame farm that's large enough for it, it could be worth designating an area for sunflowers permanently and filling all but one square with min-petal sunflowers, allowing a quick "power topup" function where you pop over to the remaining square and harvest->plant a sunflower without having to care how many petals it has and without needing to water the rest of the flowers. i guess you'd need to reset it whenever the farm expanded tho

  • @Luwuci
    @LuwuciАй бұрын

    Olexa - I am no math major but I know an ai that is and according to my favorite AI I have some things to think through for you! You do not have to go back (obviously) to change how many you harvest, but in a 7x7 grid you have a few options for efficient breakpoints of carrots -> power: The most power per carrot will always be 'Harvest one flower, replant it'. The most time efficient (assuming that it takes about half the time to replant that it does to harvest) will be to harvest as many as you want before replanting. There is a weird breakpoint, where in a 7x7 grid the optimal is about 10 harvested. From 1->5 is a BIG jump in speed (once again assuming twice the time to harvest as plant) for a relatively low return in power per carrot, but from 5-> 10 is ANOTHER really big jump in speed with another relatively low return in power per carrot. However, the jump from 10->15 is MINUTE in comparison of jumps in terms of speed, where you are now getting basically no increase in speed in exchange for a much bigger loss in power per carrot. All of this is something to consider, as well as considering that fact that you could always replant and measure as soon as you harvest a sunflower meaning the code would read something like: plant all --> scan all --> go to biggest --> harvest and replant --> add new flower to list --> go to biggest --> harvest and replant --> etc etc. which, in terms of speed and power per carrot would be the best of both worlds because you are not going over the entire grid attempting to replant instead you are just planting exactly what you've removed.

  • @frisbe3803

    @frisbe3803

    Ай бұрын

    I actually did this and it kind of works My Code breaks After two minutest or so Also as soon as you plant them you can measure and dont have to wait for them to grow So i am constantly replanting and harvesting the sunflowers And if the recently planted sunflower is by Chance the one with the Max petals i spam it With fertilizer so it grows instantly and i can Farm it directly

  • @carneloot
    @carnelootАй бұрын

    I am loving this series! I ended up picking up the game for myself and am having a blasting remembering the good old times at uni. It's funny how everyone finds a different way of solving things.

  • @shurialvaro
    @shurialvaroАй бұрын

    My go to for energy is: Plant a sunflower Measure its petals If it doesnt have 7 petals (the minimum it can get) till the ground twice to get rid of it repeat till you have the full square fertilize and harvest the same plant over and over

  • @Benthorpy

    @Benthorpy

    18 күн бұрын

    This is the most efficient method after you get it set up, while setting up you can even harvest instead of tilling to reduce waste as all previous sunflowers will have 7 petals

  • @shurialvaro

    @shurialvaro

    18 күн бұрын

    @@Benthorpy harvesting the wrong sunflower kills all sunflowers.

  • @leannviolet
    @leannvioletАй бұрын

    This series is maturing very well, keep up the good work! - your function is awesome to watch... and, hear me out.... If you have sunflowers, and you already know all the values of petals of all the flowers, then you would only need to compare one new one. - so harvest (1), water(1), plant (1), wait (or recheck all petals, if you suspect they'll change), measure petals of ONLY the new one , do math, repeat from harvest. - so you'll continually only need to replant the one you harvested - so coming into the function: plant them all, measure them all. then head to the second part of the function which is basically maintaining the garden - efficiently. but, straight mathematics on side note: I am convinced your method of harvesting all those with highest value is higher return over time (at cost of more energy usage too) I would love to see you do a completely automated 4x4 farm (that farms everything efficiently at the same time.)

  • @iconica9516
    @iconica9516Ай бұрын

    as one of the many people watching this that doesnt do any actual coding, i still feel like im learning just from watching im understanding what does what and how it reacts with other stuff and its really cool this might get me into coding just because it makes you feel smart

  • @ducc6613
    @ducc6613Ай бұрын

    Jesus Christ. 5 minutes is the earliest I think I'll ever be without notifications

  • @CapnSudz
    @CapnSudzАй бұрын

    I did a List of Tuples that store the pedal count, x, and y and insertion sort them into the list while planting. Then you just remove the top item from the list, move to and harvest it, and repeat until the list is empty. Alternatively, when harvesting, you could replant and immediately measure and insert back into the list.

  • @jaydenoverdahl4161
    @jaydenoverdahl4161Ай бұрын

    Love the series it's great seeing your thinking process, you're tricking me into learning

  • @masterrex1000
    @masterrex100025 күн бұрын

    I was actually really proud of my solution for sunflowers, i stored the petals in a list like you did but instead of rescanning after every harvest. I keep an accurate database of the flowers by replanting, and fertilizing the flower after the harvest. Then popping the old measure and inserting the new measurement in place. By keeping the list in order i can also use the index of the measurement to derive the coordinates for the next flower, so i only need 1 list. (Found this because i couldn't get my goto function to read tuples and didn't feel like making too many new variables)

  • @EvanLarson
    @EvanLarsonАй бұрын

    Probably not the most efficient idea, but came up with an interesting strat for sunflowers. Plant the whole field, then eliminate the all the flowers that have more petals than the absolute minimum allowed (you'd have to find this) then plant again. Eventually, you will have a field where all flowers have the minimum possible petals. Then, you can just spam grow and immediately harvest on the same square without needing to check anything.

  • @SanjamKumar

    @SanjamKumar

    Ай бұрын

    Sadly if you harvest anything but the max petal sunflower, it destroys all the sunflowers on the farm, so this strategy wouldn't work.

  • @EvanLarson

    @EvanLarson

    Ай бұрын

    ​@@SanjamKumar it would work, since no matter how many petals the flower is, because all others are at the minimum, it is either greater than or equal to and can be harvested without destroying them. And you can get them all to be the minimum by not destroying the ones that are at the minimum until they are all there. If we have a 4x4 grid where the numbers represent the petals, (and 1 is the min) 1,2,3,4, 5,6,7,8 9,10,11,12 13,14,15,16 We destroy 16 then 15 then 14... until just 1 remains. We replant and get 1, 1, 1, 1 1, 1, 1, 1 2, 3, 4, 5, 6, 7, 8, 9 (obviously some luck to speed up the process) and repeat until 1,1,1,1 1,1,1,1 1,1,1,1 1,1,1,[anything here] Then we can harvest the bottom right and replant, it will never be lower than the maximum petals

  • @MindCaged

    @MindCaged

    Ай бұрын

    Hmm, sounds like it could work, though you generally don't /need/ tons of power, you only use it to boost the drone's speed and in my experience it lasts a good long while, so after I got over like 100K it'd probably last for like an hour or more, haven't done any math, it just depletes very slowly if your code is efficient.

  • @peter5394

    @peter5394

    Ай бұрын

    @EvanLarson it does work, I’ve done it before. The minimum amount of petals in 7 so you plant everything to have 7 petals and spam harvest

  • @Skullman1985

    @Skullman1985

    Ай бұрын

    i went for that, as i play the game as an idler (Starting a crop and then doing other things, coming back after some time to thousands/millions of resources). I started sunflowers comparing and harvesting the biggest the whole time. I replanted the harvested sunflower right away, so never reset the field during a sunflower run. My first try was pretty basic, always scanning the whole field for every harvest, updating a coordinate variable every time a bigger sunflower was found than before. Because of that i noticed the obvious effect, that after a long time i was left with only minimum sized sunflowers in the field and only the first flower was ever harvested. Which brought me to my current code. With fertilizer and water i grow and harvest each square until the petals measure 7 (least amount of petals). I plant my field like this and when it is done i plant-fertilize-harvest the same square as long as i want. But like i said, only really makes sense when playing the game as an idler, as planting the whole field with 7-petal-flowers already takes some time depending on the RNG-Gods. Really want to find the time to get back into the game, rewrite everything with the goal being efficiency with an eye towards the reset-leaderboard.

  • @frisbe3803
    @frisbe3803Ай бұрын

    Love your vids was looking forward to this one the whole day

  • @KarateDuckFull
    @KarateDuckFullАй бұрын

    Damn this code was super clean and worked like a charm! Very nice episode, really enjoyed it! Loving the game

  • @ericslingerland5472
    @ericslingerland5472Ай бұрын

    if we want to ignore replant the flowers as they are harvested, i would say the best number for num_maxes would be (world_size^2 - (world_size - 1)^2), assuming power gained rounds down to the whole number. for the 7x7 grid you get 7 energy on the first flower when you have 49 flowers, then 6 energy for each flower after that until you are below 36.

  • @user-wh5wt3sh9w
    @user-wh5wt3sh9w23 күн бұрын

    When you plant or scan you start each column from the top. You could do top bottom top bottom. Saves one move each column.

  • @thedouchebagofholding980
    @thedouchebagofholding980Ай бұрын

    Very efficient and fun to watch.

  • @3zdayz
    @3zdayzАй бұрын

    Immediatly after you plant you can measure and remove the extra scan. Also you can almost always hatvest then plant. Then you can keep the grid replacing as you harvest

  • @Gratz-BrawlStars
    @Gratz-BrawlStarsАй бұрын

    @Olexa I believe you can scan as soon as you plant the sunflower. It doesnt need to be fully grown to "measure" how many petals there are. This should remove an entire movement cycle from the loop. Hope this helps!

  • @JanBebendorf
    @JanBebendorfАй бұрын

    So there are a few improvements you could make. First you can already measure directly after planting so you don't have to scan the entire field again. Secondly you could make the list sorted by the amount of petals while inserting so you can just iterate over them while farming. And the third thing would be to optimize the farming path reducing the walkways instead of randomly farming the first flower with the highest amount of petals. Your goto also looks quite wild and you are essentially defining every possible situation instead of generalizing it. My approach was that there are always 2 ways to get to another point on each axis, either by taking the "simple" way of just going b-a or by using the "advanced" way utilizing the border overflow. I then just calculated both ways and took the shorter one by comparing the absolute length of the 2 values. For example given a world size of 10, current x of 1 and destination x of 9 you can either go 8 or -2 steps. -2 is the shorter absolute path so I would go 2 times West.

  • @OlexaYT

    @OlexaYT

    Ай бұрын

    That’s probably intelligent lol

  • @LawValentine
    @LawValentineАй бұрын

    Looks like the Sunflowers will immediately register their pedal count when planted. For more efficiency, I would harvest, plant, check petal count, then move to next highest petal count. that way you're always harvesting sqrt(count) power, and minimizing the movement required between harvests since you already have the farm state

  • @nks1111
    @nks1111Ай бұрын

    You can plant, water and measure each cell till the farm is planted, then harvest the one with most petals, do the pop’s, replant it, measure it and keep going. It will take more time to fully plant the farm, but, once it gets going you aren’t gonna be dang fast!

  • @ampmunkey
    @ampmunkeyАй бұрын

    I bought this then proceeded to spend 10 hours playing it. So damn fun! I setup the sunflowers to leave any 7’s until they were all 7’s. Then just park it at 0,0 and spam plant>water>fertilize until out of seeds or fertilizer. Absolutely slams once it hits high gear!

  • @dantedamean
    @dantedameanАй бұрын

    Love this series! Never learned programming and I’m seriously able to follow you even when you say you’re getting lost lol

  • @lordthor5951
    @lordthor5951Ай бұрын

    Finally I got done doing my own sunflowers so I can watch this :D

  • @pr0duct1v1ty7
    @pr0duct1v1ty73 күн бұрын

    Sick video, been watching slowly as I progress my own game, my approach to the flowers were a little different. I had similar start but I have it keep track of the highest petal flower on the board and fertilize harvest and replants the flower until its petal count is less than the previous highest. So the longer it runs the more efficient it gets until there are only 7 count flowers on the board and I can spam on tile at a time with fertilizer and planting another flower because it will never have less petals than anything on the board

  • @cerberes
    @cerberesАй бұрын

    Keep going. This is fun.

  • @joewilson3393
    @joewilson3393Ай бұрын

    You have Inspired me to learn python as my first real program language. Real meaning, VB in school not really counting because I am 40 something now.

  • @PROdotes
    @PROdotesАй бұрын

    It's interesting to see how different people do stuff differently... Sunflowers I just plant all, then go a full sweep and harvest all 15, then 14,13,12,11, then harvest any so I can just replant... Pumpkins I plant them all, then do another pass and plant if empty, and on the third pass I look for empty and keep replanting till it's done... that makes it so that after that run I can just harvest the field... with a 10x10, on average, second replant will be about 20, and 3rd would be 4 that i can just manually recheck...

  • @yekusai4786
    @yekusai4786Ай бұрын

    Unless im missing something once you get fertilizer could you harvest and replant all the sunflowers that have more than the minimum number of petals until the whole farm is minimum petals then keep the drone still and loop harvest, plant, fertilize? Probably only pays off if you want power in bulk but sounds satisfying. Thank you for keeping up the series

  • @OlexaYT

    @OlexaYT

    Ай бұрын

    Honestly yup. That sounds brilliant haha

  • @wagner.rodrigo

    @wagner.rodrigo

    Ай бұрын

    If you do that, remember to always start harvesting from the max, because if you harvest a sunflower smaller than the max all of them get destroyed

  • @Johan-iw6mb
    @Johan-iw6mbАй бұрын

    Im not sure if anyone have said this yet but if you want to "un-tabbify" aka move marked rows to the left instead of the right, you simply mark the rows, hold shift and then press tab. :-P You are welcome.

  • @SirMoohsAlot
    @SirMoohsAlot27 күн бұрын

    While there is some steps missing in my code below, this is my main intelligence for the sunflowers. After about 100 harvests the drone just stands in place, harvests → plants → fertilizes → and harvests again. Doesn't really get more efficient than that. def checkPower(tp): #tp is an empty list at the start and fills after checking each flower using this function spot=0 for c in tp: #for every coordinate (including measure) in the list if measure() >= c[1]: #if the current flowers measure is bigger or equal on the current spot (index) leave the loop break spot += 1 #increment spot and recheck the list if not empty tp.insert(spot,[me(),measure()]) #insert the current cordinate {me() as [x,y]} and measure() into lowest possible index in the list, as long as the power is high ↑ ↑ ↑ Pretty much creates a list sorted with biggest power on lowest index, including spots coordinates ↑ ↑ ↑ ############## Some mumbo Jumbo in between ############## while True: #After the first flower has been cut we land here while not can_harvest(): #Checks if the current flower is harvestable sunflowerDone() #Plants Sunflower if necessary (and returns true if harvestable) checkPower(top) #Use Function mentioned above smartMove2(top[0][0]) #Shortest Route to the first index of the list (highest Power) using the coordinate on [0] harvest() top.pop(0) #Remove the first index for the list, 2nd highest flower is now in front → Repeat the while True loop

  • @Mr_Ebuh
    @Mr_EbuhАй бұрын

    I'm making a script that fills the field with flowers with the lowest possible amounts of peddals so that you can then have the drone plant, scan, harvest, and replant on a few specific tiles knowing that they will always have more or equal to the amount of paddals on the rest of the field. I know its probably not more effective but I like the idea.

  • @Celestial.Waterfall
    @Celestial.WaterfallАй бұрын

    This series is addictive ❤️

  • @steveheffner
    @steveheffnerАй бұрын

    My first time through I used a dictionary(yea yea I did treasure before sunflowers) for my sunflowers, storing location and measurement at the same time of planting. Then I worked through that dictionary while it had items(big loop). First identifying what the max petals was(1st small loop), then once I had that iterate through the dictionary moved to where the flower was, harvest and remove from dictionary(2nd small loop). to then go back to the big loop. Basically harvesting all of the flowers from max to min. I seemed to generate energy quickly that way. I've read that if you just replant (I would have to assume rescan also) the max ones it will self optimize to only harvesting like 1 or 2 flowers. Considering a full scan each time(since I don't know what the new max is and the other flowers lost a petal or more)(aka numbers get wonky with old results and new measurements) I don't think that is energy/movement efficient. I might be overthinking this too :) and whatever measurements are there they will still be higher then the others. /shrug Anyways I restarted a new save (cause practice), and I might try it with just lists that way I can just use a max to identify maxes. Seems a bit more efficient in some regards at the very worst it is just approaching a problem differently. So win/win. Peace

  • @omechron
    @omechronАй бұрын

    What I did with mine was set it to automatically buy empty tanks whenever I have less than 5 full tanks so it just automatically expands. I also have it growing hay, trees, and carrots all at once. I have a line of hay along the bottom, the checker board of trees, and then carrots in between. That way I don't have to devote the whole farm to hay which is kinda wasteful because of how fast it grows even unwatered, and I don't have to put up with the less efficient bushes.

  • @TreseanCastiglia
    @TreseanCastigliaАй бұрын

    Thank you for making a another vid

  • @ARENVS
    @ARENVSАй бұрын

    Nice vid! with the sunflowers I instantly plant after harvesting, and check the number of petals of the new one. My code is more seed effective, but i certainly don't think is faster.

  • @GhostZeroGZ
    @GhostZeroGZАй бұрын

    I have nothing to add, just commenting for the algorithm. I love this series

  • @a1b2c4d1
    @a1b2c4d1Ай бұрын

    You have such an interesting way of solving these. I am loving the series and it's interesting to see how everyone solves it differently. def moveTo(x,y): goX = x - get_pos_x() goY = y - get_pos_y() while goX != 0: if goX > 0: move(East) else: move(West) goX = x - get_pos_x() while goY != 0: if goY > 0: move(North) else: move(South) goY = y - get_pos_y() def Sunflowers(): bestFlower = False bestPetalCount = -9999 bestX = 0 bestY = 0 currentPetalCount = 0 grown = 0 for x in range(get_world_size()): for y in range(get_world_size()): if num_items(Items.Sunflower_Seed) = bestPetalCount: bestX = get_pos_x() bestY = get_pos_y() bestPetalCount = currentPetalCount move(East) move(South) if grown == get_world_size()*get_world_size(): moveTo(bestX,bestY) harvest()

  • @DOntTouCHmYPaNDa
    @DOntTouCHmYPaNDaАй бұрын

    Hi light + Shift + Tab I believe is the un tabification

  • @peter5394

    @peter5394

    Ай бұрын

    Yes this is true

  • @billy65bob

    @billy65bob

    Ай бұрын

    It also brings up the steam overlay, so I hope you turned it off! :D

  • @Unknowngalaxyfox
    @UnknowngalaxyfoxАй бұрын

    Y'know, I really wouldn't like this game too much because my brain doesn't do that well with coding--but watching you play this game (besides the pumpkin video) was a delight to see

  • @TheTymolc
    @TheTymolcАй бұрын

    A common IDE feature is CTRL + / to comment a line. Maybe it works here too (e.g. for commenting out multiple lines: highlight those lines and press CTRL + /)

  • @OlexaYT

    @OlexaYT

    Ай бұрын

    Yeah unfortunately doesn’t. That’s what I tried

  • @soniclechat2825
    @soniclechat2825Ай бұрын

    Olexa, i need more, i need it in my veins

  • @xXpezcoolXx
    @xXpezcoolXxАй бұрын

    Shift+TAB untabs (also you can select a bunch of lines to remove or add tabs)

  • @Pirochiro

    @Pirochiro

    Ай бұрын

    That just opens up the steam overlay for me.

  • @xXpezcoolXx

    @xXpezcoolXx

    Ай бұрын

    @@Pirochiro got my steam overlay set to CTRL+SHIFT+Z or else it kept messing with some of my games. (you can change it in the options)

  • @joukeyyy6991
    @joukeyyy6991Ай бұрын

    Hey Tyler, it is not clear in the game, but you can actually measure the petals right after planting a sunflower, so you don't have to scan the entire grid again, making the process just a bit faster

  • @aldridge1975
    @aldridge1975Ай бұрын

    Great job on them sunflowers! If you wanted to harvest all the sunflowers, may I suggest that final “while” loop be “while list_petals”. I think the reason why it’s only harvesting roughly half now, is because the “num_maxes” variable is equal to “len(list_petals)” due to the length of that array reducing with every iteration of the while loop

  • @Kraus-

    @Kraus-

    Ай бұрын

    You don't want to harvest all of the sunflowers. The yield is equal to the square root of the number of flowers. Depending on how it's rounded, all the harvests while 43 to 49 flowers exist give maximum yield on the 7x7 farm. Ideally you would harvest a single flower, immediately replant, add it to the list, then go to harvest the next largest. Harvesting the entire field is a huge waste.

  • @aldridge1975

    @aldridge1975

    Ай бұрын

    @@Kraus- oh I must’ve misunderstood that part 😅

  • @sorsofol
    @sorsofolАй бұрын

    If you reset position after harvesting max_petals, then eventually all the low tier sunflowers will end up on the right half of the field and your drone will need to "fly less"

  • @user-hp9so7si4c
    @user-hp9so7si4cАй бұрын

    Thanks for video) You can call mesure() immediately after plant() sunflower and append to array coords and petals, it's faster x2 (don't need fly 2 times) I think, You can plant more carrots for seeds (example: need plant 100 pumpkins and 100 sunflowers => need 200 carrots + 100 for storage) need calculate it =) Sorry, my English is not very good, but i'm trying

  • @roidrole882
    @roidrole882Ай бұрын

    For the sunflowers, you don’t need to scan the entire grid. You can remember the petalAmount of the sunflowers you didn’t just plant

  • @sky0kast0

    @sky0kast0

    Күн бұрын

    Or you could measure it after planting at least that's what I've seen

  • @frisbe3803
    @frisbe3803Ай бұрын

    Im really Stuck on the mazes looking forward to seeing your Solution to them

  • @mattclairedad
    @mattclairedadАй бұрын

    Hey for the goto function could you not make so after the if statement all of elif are ((currx - x) >0: and so on because youd already be checking abs pos of the drone and it’s just bloating the code? I’m not sure tho.

  • @toshobagera
    @toshobageraАй бұрын

    Very satisfying 😅

  • @jayjchapman
    @jayjchapmanАй бұрын

    Amazes me how easy you found the sunflowers

  • @MindCaged
    @MindCagedАй бұрын

    If you do write a breadth first algorithm I'd love to see it, though it might be overkill, and not sure if it could easily work since you can't see where the walls are, you can only try to travel a direction and see if it succeeds or fails. My algorithm is actually quite simple and is rather short after I simplified it, it's basically the hug the wall method. If you wanted to do the advanced maze feature where you re-use the maze and it moves the treasure chest and tells you where it'll move to so you actually have an idea where the chest is, so you can try to move towards it, though that gets /much/ more complicated and I'm not brave or experienced enough to try it, especially since I don't know how much greater the yield you'd get.would be for all the extra work. With all the speed upgrades it only takes a very short time to solve the maze even with a simple algorithm, so I feel for me it's easier to just solve the maze once and restart, rather than trying to level up the maze. Maybe I'm missing something. I suppose maybe if you kept a map of the maze you could calculate the shortest path to a given coordinate without having to move, but from what I understand leveling up also randomly removes a wall, so you might end up keeping following the original map because there's no way to tell if a wall has been removed without trying to travel through it, and also the hug the wall method only works if there are no loops, while removing a wall might also open up a loop.

  • @jeffreyblack666
    @jeffreyblack666Ай бұрын

    I think the optimal way to do the sunflowers, without getting into travelling salesmen problems is to harvest the sunflower, replant it, and keep harvesting until that first one has grown, then check the newly planted ones and add them to the list.

  • @Youwanttodream
    @YouwanttodreamАй бұрын

    Feed me more tasty pumpkins Olexa

  • @matusfelcir6260
    @matusfelcir6260Ай бұрын

    25:50 You can actually mark the entire section of code and Tab it or Shift-Tab it

  • @loganaddington6852
    @loganaddington6852Ай бұрын

    You might be able to press Shift-Tab to de-Tabify everything after highlighting it, at least that is how all my progams have worked.

  • @khaledahmed9136
    @khaledahmed9136Ай бұрын

    I did the sunflowers using an array, just stored the number of petals of each sunflower and used their index within the list to find their coordinates. But this works just fine.

  • @Kraus-
    @Kraus-Ай бұрын

    Elegant af.

  • @Merguin
    @MerguinАй бұрын

    With at 7x7 grid size you have 49 spots, so for sunflowers alone you can collect like 20 or even 30 and you would still net 5-6 energy per sunflower. As you get 6 energy from 36-48 (if it does not round up) and 5 energy from 25-35 per harvested sunflower. So 24 would be a decent number for 49 plants. 4 energy might be worth it too, didnt do the math on that one there

  • @owenatkin3148

    @owenatkin3148

    Ай бұрын

    Yeah but doesn't y=√x where X is the number of petals return a diminishing return? Wouldn't the ideal play be to cultivate a single square of.sunflower?

  • @Milbyte11

    @Milbyte11

    Ай бұрын

    @@owenatkin3148 have to take into account that the growth is not instant (unless you want to use fertilizer)

  • @apophys1110

    @apophys1110

    Ай бұрын

    @@owenatkin3148 You get power equal to the square root of the number of sunflowers; the number of petals on the sunflower doesn't factor in at all. If the grid is full of flowers, you earn power equal to the side length of the grid (in this case 7). If you harvest a maximum-petal sunflower, all the other flowers stay, otherwise they disappear. The actual number on the petals is irrelevant. It saves resources, and actions that would drain power, to maintain a planted field between iterations.

  • @Merguin

    @Merguin

    Ай бұрын

    @@owenatkin3148 well kinda in that manner, as it returns the squre root from the total number of planted sunflowers. Asuming it does not round that means that you only get 7 power from 49 so the first plant, then you get 6 power until you harvest the 36th plant (14 harvested in total, for 85 energy ), then 5 until you harvested the 25th (25 harvested in total for 140 energy), then 4 until you harvest the 16th ( 34 in total for 176 energy). So I would make the break either after 85 or 140 energy, as then you gain less

  • @yohoki4642
    @yohoki4642Ай бұрын

    Ah.... Ya... I was one of those that assumed sunflowers would be more difficult..... It was for me though because I made it difficult! I was not happy with the list functions, so I made several helper functions, like IndexOf(Item), RemoveAt(Item, Index), and Replace(Item, Index). It didn't occur to me to use Max. lol I ended up storing a list of [coords, pedals] and finding the first, largest sunflower, harvesting it and replacing it in the stored list. Pluses, you always get max power each harvest, because the grid is always full. Cons, I suck at coding and should have just used Max! XD Mazes will be fun. I am still don't really understand how to BFS or DFS, but I think a simple "Follow the left wall" should do the trick.

  • @marcbennett9232
    @marcbennett9232Ай бұрын

    nice nice! I havent made it to sunflowers yet, I can only take so much coding at a time lol. I wonder if you could harvest all the largest sunflowers until the entire grid is the minimum number of petals and then harvest the entire grid.

  • @OlexaYT

    @OlexaYT

    Ай бұрын

    Probably

  • @jujment699
    @jujment699Ай бұрын

    Anyone who said sunflowers are hardest havent got to mazes and companion crops lol. having a fully dynamic and expandable script for companion crops is a toughie. and if you can get your maze algorithm up to the 300 iteration cap, you have my respect as a programmer

  • @humanname1458
    @humanname1458Ай бұрын

    Lets do some basic maths World size 7 √49 = 7 energy the first √48 to √36 are all decimels of 6.x So if rounding is to nearest √48:√43 √42: √36 > 6.5 So youve effectively gotten 7^2 energy from the first 7 harvests. So it really depends on how many actions its taking in your goto function for the counter. You have 49 tiles to traverse too so you want at least 4 energy per harvest just so you have the energy at least to cover scanning and planting (49*2 = 98, 4 energy is 120 actions. So as long as √Sunflowers > (tiles in field*2) youre net positive on energy. Do inverse operation 4^2 is 16 49-16 = 33 So you can harvest 33 sunflowers before youd see diminished returns. I dont quite know how you'd make the function but ill do my best to express the maths. Num Tiles - ((RoundUp((Num Tiles *2)/30))^2) = MaxHarvests This should make it scale with the size of the farm so that you never harvest unless youre net positive. Im not sure how or where the rounding occurs so you may have to just find how you can apply this logic to the code.

  • @humanname1458

    @humanname1458

    Ай бұрын

    I mean the actual most optimal way numerically is to only harvest 1 sunflower a time. You always get the maximum energy you're only replacing the one seed and planting the one seed. 1 seed equals world size energy 7 x 7 is 49 √49 is 7 So just doing one means you'll constantly just get world size energy and it takes the least amount of actions as it's only doing a small amount of actions in-between. Harvest trade seed plant seed and water and then go to again But I admit the drone looks super happy using instant transmission all over the place.

  • @animeandothers1
    @animeandothers1Ай бұрын

    Olexa flexing his coding skills will never not be entertaining

  • @dillonvandergriff4124
    @dillonvandergriff4124Ай бұрын

    Great episode! One question though (non coder); won't your drone get stuck if all the sunflowers have the same number of petals? That might happen if you afk for a good bit.

  • @OlexaYT

    @OlexaYT

    Ай бұрын

    They would all be the maximum at that point so i think it’d just choose a random one and harvest it

  • @outis6115
    @outis6115Ай бұрын

    Hey olexa iam no coding genius but cant you plant the sun flowers as you harvest and scan at the end and go forever?

  • @mathieularocque1953
    @mathieularocque1953Ай бұрын

    Not too much to say on this one, except you that you can plant and measure right after without looping the grid for it, it also let you harvest plant measure then goto the next with the most, just make sure you check for can_harvest if you do that because the new flower could be the next you want to harvest...

  • @replikvltyoutube3727
    @replikvltyoutube372715 күн бұрын

    Your initial implementation was good, as number of sunflowers matters for power, not petals

  • @Mythiquez
    @MythiquezАй бұрын

    "untabbify": shift + tab Steam overlay might pop up, so you may have to change Steam's shortcut to open the overlay if you haven't already

  • @Kasperbjerby
    @KasperbjerbyАй бұрын

    You kinda want it to get the whole grid full of bad sunflowers and then just harvest a single one that is the best and replant that, cause then you end up where you can just keep replanting and harvesting the same single tile over and over again and keep getting the most power, its going to be faster and alot cheaper on the seeds, but this also works fine 🤗

  • @Jengamouse
    @JengamouseАй бұрын

    If you have fertiliser could you plant, fertilise and then measure it immediately? That would remove the need for passing over the whole grid each time.

  • @zuzoscorner
    @zuzoscorner7 күн бұрын

    New to programming, so had to watch avid or two to get how it would work for list and loop right. the remove from list command and such so it only hrvested the highest petals ones. The While loop to get back to 0,0 was handy tip. still not sure how a GoTo function works.

  • @KarboGorm
    @KarboGormАй бұрын

    24:13 is it possible to get a list of the average power harvested to compare it and adjust it to the correct number of sunflowers you would harvest?

  • @N_Telsa777
    @N_Telsa777Ай бұрын

    Olexa, I think that you can put the reset drone and harvest grid functions at the start of the main loop instead of using one per function

  • @NikhilKapadia
    @NikhilKapadia28 күн бұрын

    Highlight Code and hit Shift + Tab to untab multiple lines of code

  • @Cadllmn123
    @Cadllmn123Ай бұрын

    Hell yeah, let's go Thinky Boi

  • @4louisMC
    @4louisMCАй бұрын

    Wheres the next one?! I need MORE!!!!

  • @FrostedOrgami
    @FrostedOrgamiАй бұрын

    Tyler, why not use a temp variable that you compare to each petal and if it's bigger store that and as it goes it overwrites the chords and num petals so that if >= temp: num_petals == measure() , chords == [get_pos_x, get_pos_y] ?

  • @OlexaYT

    @OlexaYT

    Ай бұрын

    That’s good for finding one max but how would you find the next?

  • @LesslyPoint
    @LesslyPointАй бұрын

    Heya! Was wondering if it were possible to replant every time you havested, so that each harvest was max value?

  • @OlexaYT

    @OlexaYT

    Ай бұрын

    Yup for sure

  • @LesslyPoint

    @LesslyPoint

    Ай бұрын

    @@OlexaYT I would love to see that, I loved the optimisation of the Pumpkins

  • @secretjameser
    @secretjameserАй бұрын

    Shift + tab to untabify

  • @Dr.Geeves
    @Dr.GeevesАй бұрын

    Doesn't Shift-Tab work to tab things leftwards?

  • @terrybutterfield7098
    @terrybutterfield7098Ай бұрын

    Not sure if it’s still a thing but I heard there is a competitive mode. You should look into that once you unlock everything so you can try and really min/max the code

  • @whoagainwastaken32times
    @whoagainwastaken32timesАй бұрын

    Found this channel like, 3 hours ago. Ima be real, im only here for the farming game. 10/10

  • @OlexaYT

    @OlexaYT

    Ай бұрын

    It’s almost like all of my content is good!

  • @whoagainwastaken32times

    @whoagainwastaken32times

    Ай бұрын

    I plan to watch more, you are fr underrated.

  • @whoagainwastaken32times

    @whoagainwastaken32times

    Ай бұрын

    ​​@@OlexaYTbtw, only water the ones you cut for the sunflowers, you used 300 barrels.

  • @hephestusbh1803
    @hephestusbh1803Ай бұрын

    Hey Tyler, I'm trying to figure out what to do for a career so I was wondering what do you do exactly, do you interact with people often, and do you enjoy what you do?

  • @OlexaYT

    @OlexaYT

    Ай бұрын

    I definitely like what I do. I’m a SOAR engineer, which is a more development/code focused branch off of general cybersecurity. It’s a lot of coding automations and playbooks to improve efficiency in our security teams. It’s definitely a good chunk of interacting with people because I’m more of a managing position for our platform. i pseudo manage two other people and the three of us do the work on the platform. I do a large chunk of the coding but I also manage the communication with people about what we’re making, reaching out to get instructions on what they want, etc. I unfortunately can’t say too too much here but I can answer other questions if needed. I do not think it’s a good position to “start” with if you’re just getting into cybersecurity. I worked for three years in a security operations center and another two years doing a couple of “other things” in cybersecurity. But having the broad background was extremely useful and helped narrow down to my current career (and it was very lucky I fell here)

  • @hephestusbh1803

    @hephestusbh1803

    Ай бұрын

    ​@@OlexaYT thanks for answering quickly

  • @DerSolinski
    @DerSolinskiАй бұрын

    You shouldn't loop in your goto function. Under certain conditions move can fail and you want to catch that. Also you sometimes you want to do certain actions on every visited field, not gonna happen with a internal loop. Here is some inspiration: harvest_and( waterIfNot_and( .7, move_to(x,y)))

  • @OlexaYT

    @OlexaYT

    Ай бұрын

    How can my goto fail under certain conditions? It’s an infinite grid

  • @DerSolinski

    @DerSolinski

    Ай бұрын

    @@OlexaYT You'll see ^^ not spoiling.

  • @OlexaYT

    @OlexaYT

    Ай бұрын

    I don’t use goto in my maze function.

  • @DerSolinski

    @DerSolinski

    Ай бұрын

    @@OlexaYT You will, when you start to boost mazes.

  • @OlexaYT

    @OlexaYT

    Ай бұрын

    Yeah I made a simple maze function but it’s not a full blown BFS or DFS, a better goto would be useful for that. I’m very likely never bothering with that though. We probably only have a couple more episodes I’ll do

  • @BadgerBishop
    @BadgerBishopАй бұрын

    I don't know about the code, but the outcome is what I'd want for optimal bot activity.

Келесі