Cookie Clicker

Cookie Clicker

Grandma's Rolling Pin (Automation/Utility)
Suggestions to Improve Dylan the Stock Broker
Currently Dylan the Stock Broker has a hard time making any actual profit unless you are leaving your game running for days at a time, due to all the stock history resetting and immediately making purchases when opening the game if you have "Dylan's Evaluations" enabled.

Some potential suggestions for improvements:

1. Add a Buy setting even lower than Frugal called "Low Risk" that uses 3$ OR Frugal, whichever is the lower value. This effectively eliminates high risk purchases.

(Perhaps even set this as the default option, because otherwise you are virtually guaranteed to lose a bunch of cookies for no reason upon enabling Dylan and you will have to commit to leaving your game running for the next 24 hours to make a profit.)

2. Store median and average values across save reloads so that Dylan can continue using these values to better determine Buy and Sell prices.

3. Currently you can only set the Minimum percentage of stock purchasable to enable a stock purchase from Dylan. Being able to set another value for the Maximum percentage of stock purchase at a time from Dylan would be helpful in some cases.

4. If you want to copy the effective algorithm by the guy who made the CookiStocker mod, his explanation is here: https://steamhost.cn/steamcommunity_com/workshop/filedetails/discussion/2992885336/3802778195620505953/

5. If you are feeling extra creative and don't want to copy a pre-existing algorithm but want something more scuffed and interesting, you could add a toggle to enable a sort of gambler's algorithm (this algorithm is of my own creation; if you use this please give credit on this mod's Workshop page and link the discussion post) as an augmentation to the basic Buy/Sell algorithm:

Each tick:

*An Initial Quantity (this value is set by a setting and overrides the Maximum percentage setting mentioned above) of any unowned stock within the Buy range is purchased.

*A currently owned stock that has increased in price into the Sell range is completely sold.

*A currently owned stock moving from any mode to Slow Fall (mode 2) is purchased; the quantity purchased is a fifth of the currently owned quantity.

*A currently owned stock moving from any mode to Fast Fall (mode 4) is purchased; the quantity purchased is the currently owned quantity (i.e. "doubling up").

*A currently owned stock moving from Slow Fall (mode 2) to Slow Rise (mode 1) or Fast Rise (mode 3) is sold; the quantity sold is a fifth of the currently owned quantity, unless the currently owned quantity is the Initial Quantity or Max in which case no quantity is sold.

(i.e. Reaching Max on a stock falls back onto the basic Buy/Sell algorithm)

*A currently owned stock moving from Fast Fall (mode 4) to Slow Rise (mode 1) or Fast Rise (mode 3) is sold; the quantity sold is half the currently owned quantity, unless the currently owned quantity is the Initial Quantity or Max in which case no quantity is sold.

Additional rules:

*If a currently owned stock has moved from Slow Fall (mode 2) to Chaotic (mode 5) AND the current price is higher than the last purchased price, the stock is sold; the quantity sold is a fifth of the currently owned quantity, unless the currently owned quantity is the Initial Quantity or Max in which case no quantity is sold.

*If a currently owned stock has moved from Fast Fall (mode 4) to Chaotic (mode 5) AND the current price is higher than the last purchased price, the stock is sold; the quantity sold is half the currently owned quantity, unless the currently owned quantity is the Initial Quantity or Max in which case no quantity is sold.

*If a currently owned stock has moved from Stable (mode 0) to Slow Rise (mode 1) or Fast Rise (mode 3) or Chaotic (mode 5) AND the current price is higher than the last purchased price, the stock is sold; the quantity sold is a fifth of the currently owned quantity, unless the currently owned quantity is the Initial Quantity or Max in which case no quantity is sold.

(Final notes: The last rule here treats the last purchase as if it was a Slow Fall purchase, since I can only assume that trying to track a stock moving from one mode to the next 3 times would be overly complicated. There are no rules defining valid Chaotic mode purchases for similar reasons of over-complication in the ruleset.)
Last edited by · 無名 ·; 6 Jul, 2024 @ 2:10pm
< >
Showing 1-5 of 5 comments
· 無名 · 4 Jul, 2024 @ 1:59pm 
Updated the rules of the gambler's algorithm to be more consistent.
· 無名 · 4 Jul, 2024 @ 2:10pm 
Updated the rules of the gambler's algorithm again to be more safe by falling back to the basic Buy/Sell algorithm upon reaching Max stock quantity.
Best Dad  [developer] 6 Jul, 2024 @ 8:47am 
The fundamental flaw with the Broker that I haven't addressed, because it'd essentially require a full rewrite, is the fact it doesn't take the market modes into account at all. I've said it a few times in the normal workshop comments iirc. When I initially wrote the broker, I thought the game saved the price history and I used this assumption for how the broker worked; I used the 'vals' variable in the game to determine the average stock price, and based on the buy/sell price on that value. I was completely oblivious to the 'mode' the stocks could be in too, and didn't factor that into my code at all.

Since the broker's release, and all the people complaining it sucks, I've thought of ways to improve it and they all revolve around utilizing the mode of the stock and buying/selling based on that, ensuring a profit. Probably have it track the median price and revolve the fall/rises around that price to determine the buy/sell prices. What you laid out in the 'gamblers algorithm' is essentially what I've been theorizing, but I just haven't really worked on the mod at all within the last like, month, or whenever I pushed the latest release.

Basically: the Broker needs scrapped and reprogrammed from the ground up. I'm mentally unable to do that at the moment.

Your ideas are good. I agree with your gambler's suggestion, just, it's how the Broker should fundamentally function, I think.
· 無名 · 6 Jul, 2024 @ 1:08pm 
Gotcha, thanks for the reply.

Yeah, honestly I initially thought the Broker functionality in the mod might use a similar algorithm to the one I fleshed out in this thread, but then I enabled it and... the rest is history 😅
· 無名 · 6 Jul, 2024 @ 2:05pm 
Added 3 more rules to the algorithm under "Additional rules:" to account for Stable and Chaotic modes more often than the initial ruleset, along with some explanatory comments at the end.
< >
Showing 1-5 of 5 comments
Per page: 1530 50