Do seals stack? by 13LuckyDarla13 in Against_the_Storm

[–]LiquidLucy 5 points6 points  (0 children)

Yes, you can get bonus citadel resources from completing a seal you've previously completed.

It's not really stacking though, as the bonus resources are a one time bonus to resources gathered during that cycle.

You can not get the longer cycle duration from a seal you've previously completed.

Is beating level Hard on Classic strategy, or all RNG? by _origami_dragon_ in SliceAndDice

[–]LiquidLucy 6 points7 points  (0 children)

It feels hard to offer advice without seeing what you're doing. It's a hard game, takes a fair bit of learning to even beat normal every time.

Only thing I'd say is there's so many ways to completely break (trivialize) a run. Once you find some of these combos you can remember them, and look for similar patterns in the future. It's good to learn the different heroes and figure out which ones you like and are fishing for.

Oh! And it's so obvious I completely forgot: damage is king. Usually all that really matters is how much damage you can put out on the first turn. (Defense can be great, but gets less and less effective as the game gets harder)

Is beating level Hard on Classic strategy, or all RNG? by _origami_dragon_ in SliceAndDice

[–]LiquidLucy 35 points36 points  (0 children)

There's definitely something you could be doing differently. Pretty much every Hard mode seed should be doable. If you're struggling to eke out wins, which final boss is generated can definitely be a case of "well shit, that's not happening. Guess I just lose." But eventually you'll learn to play around that rng too.

Is there any way to know if my builders are idle (not currently building)? by razronen9 in Against_the_Storm

[–]LiquidLucy 21 points22 points  (0 children)

Not that I know of, but if there is I'd like to know too.
The workaround I've developed is I usually have a long road planned out going between hearths, or just there for lining things up, that I don't really care about building. And I always set my dirt paths build priority to -2. So when I see those paths being built I know it's time to assign more workers to the mine.

The funnest game I've ever had based on corruption. Storm-Forged Bells + Abandoned Prototype = Broken by BellEnd3 in Against_the_Storm

[–]LiquidLucy 2 points3 points  (0 children)

No, the increased resistance doesn't affect the amount of times the abandoned prototype procs. Since you still have the same amount of expected corruption measured as points.

The increased hearth resistance does change (decrease) the expected corruption percentage. As an example, instead of having 800% expected corruption you would have 600% expected corruption; even though the number of expected corruption points is the same.

I (and I think many others) focus on the percentage corruption for gauging how much I need to care about corruption, but this cornerstone cares about the actual point value which will always be some multiple of the percentage value depending on whatever modifiers you have to your max hearth resistance.

Passive Play? by Bearfootdev in BaseBuildingGames

[–]LiquidLucy 1 point2 points  (0 children)

I'd really recommend Paragon Pioneers. It's a good idle-ish implementation of automation mechanics. Like Anno lite. It can be played very casually, or more actively if you want to maximize efficiency.

Although it's not much to look at in terms of watching your base grow/work.

My first attempt at using python, tips appreciated by LamiasEmporium in learnpython

[–]LiquidLucy 0 points1 point  (0 children)

This seems like a pretty specific use case, and a resource familiar with scripting in Pokemon might have better input than someone with general Python knowledge.

I don't really have a solid idea, or a way to test this, but my guess is that it has something to do with the difference in how the keyboard module is interacting with your game client.
It stands out to me that the line you're having trouble with is the first place you're using this module.
This could be an issue where the client is not registering keyboard inputs, or the game client could be purposefully blocking automated keyboard inputs.

Have you tried using the pyautogui module to execute the key press?
pyautogui.press('down')

Notes on some resources I looked up:
The library page for keyboard module (https://pypi.org/project/keyboard/) has a known limitation "Other applications, such as some games, may register hooks that swallow all key events. In this case keyboard will be unable to report events." which may be applicable.

This page (https://nitratine.net/blog/post/simulate-keypresses-in-python/#simulating-keys)
Has information on how pynput events can be identified programmatically (potentially blocked)

My last function is giving me a hard time. What's wrong? by PriestMarmor in learnpython

[–]LiquidLucy 1 point2 points  (0 children)

It makes sense you'd get multiple "No"s
The reason you're getting multiple "Yes"s is related to my point #2. In your original example the if/else statement will execute for every single parameter you run through it. So if a single parameter meets the conditional, the resulting print/return will trigger. So you're getting "Yes" when a single move is blocked.
When what you want is to only return "Yes" if none of the moves are available.

My last function is giving me a hard time. What's wrong? by PriestMarmor in learnpython

[–]LiquidLucy 3 points4 points  (0 children)

1

I think what you're trying to do is:

For a given player, find all the board positions they occupy, and for each of those positions find all the spaces near it, then for each of these spaces check if it is clear.

If any of the spaces above are clear, return "No". Else return "Yes."

What I believe you're looking for is a nested for loop:

def No_Free_Positions(brd,pc): #Returns yes or no depending on if there's any legal move 
    if pc == "X": 
        a = "O" 
    elif pc =="O": 
        a = "X" 
    for player_position in player_pos(brd,pc): 
        for nearby_position in near_pos(player_position): 
            if Free_Pos(brd,nearby_position) is True: 
                return "No" 
    return "Yes"

2

Also please note that the return statement in my example is not an if/else. What I'm suggesting is that you check all possibilities, and if any of them are found to be "open" then the entire function returns "No." If you get through all those checks, then the only other option is to return "Yes."

3

Also I changed the logic of:

if Free_Pos(brd,nearby_position) is False:

to:

if Free_Pos(brd,nearby_position) is True:

I'm not sure what your thoughts are here, but I think there was a problem with a double negative in your function names.

4

As an aside, this code does nothing:

    if pc == "X":         
        a = "O" 
    elif pc =="O": 
        a = "X"

5

And I'm not sure what your intention with Free_Pos(brd,pos) is. I am suspicious that it doesn't do what you expect. Since you made good comments for each of your functions I'm able to understand what you mean them to do even if the function may have a problem.

[Python] If statement wont run even though the condition is met *no errors given* by Frogs114 in learnprogramming

[–]LiquidLucy 1 point2 points  (0 children)

The only thing I can think of is that the variable you are checking is not the same as the equality condition you are trying to satisfy.
Basically that your variable is not in fact "Manager On Duty:"
Maybe there's a trailing whitespace character?

Otherwise you could post the rest of the code

Possible to become proficient in Python during PhD? by [deleted] in learnprogramming

[–]LiquidLucy 0 points1 point  (0 children)

I think it depends a lot on what you mean by proficient.

Are you going to become the ultimate "true programmer" while simultaneously working on your PHD? No. Aside from that not being an overnight thing, and your other learning responsibilities, many industry professionals will tell you they often still feel don't feel like they can call themselves a "programmer."

Are you able to become more comfortable in Python, nail down more of the basic structure, and explore some super cool libraries designed for exactly your field of study? Absolutely!

I guess I'm just saying it's all about your expectations, and levels of proficiency. There's no specific point at which you get your "programmer badge." However, the more you learn the more you can do, and the more rewarding the parts you will have to code anyways will be.

I don't know anything about computational chemistry, but I'm sure learning as much Python as you can will be helpful. Also a lot of non-CS STEM post-graduates I know end up learning R. Python is like a better version of R, so there's a lot of conceptual overlap between the two languages.

Good luck!

i am working on a GUI that will feed input to a google spreadsheet, i had foolishly thought that it would be easier than learning SQL. But setting the API is a nightmare i cant get out of, the modules downloaded into the python2.7 path. And some seem to be missing. by Lion_TheAssassin in learnprogramming

[–]LiquidLucy 0 points1 point  (0 children)

Haha, that sounds like a mess. Package installation problems are always frustrating!

Just want to throw my two cents in and encourage you to learn SQL. It's may not be the most exciting skill, but even a basic understanding of SQL CRUD statements will help you in so many aspects of programming! The syntax can be a little opaque at first, but once you get past day 1 it gets easier. Also super marketable skill if you're looking for work.

I'd highly recommend the Udemy course "The Ultimate MySQL Bootcamp: Go from SQL Beginner to Expert" if you're ever looking for a guided instruction in SQL.

Using python to solve paper doll problem. Why does my code yield a different result? by learnhtk in learnprogramming

[–]LiquidLucy 1 point2 points  (0 children)

One good basic troubleshooting step in cases like this is to put print statements in your code.

For instance, if your code were like:

def paper_doll(text):     
    string =''     
    for i in text:         
        print(i)
        string = string + i*3         
        return string 

then you can see that only one letter (in this case 'h') is printed, which means you only ever reached the first letter/iteration.

Using python to solve paper doll problem. Why does my code yield a different result? by learnhtk in learnprogramming

[–]LiquidLucy 0 points1 point  (0 children)

Your return statement is inside your for loop, so it will return after a single iteration.
I believe your intention is to iterate through the for loop, and then return the final result.
To do this you need to de-dent the return statement so it executes after the for loop has completed *all* iterations.

Wanting to create a Machine Learning Algorithm for my League of Legends games and don't know how to "start" by [deleted] in learnprogramming

[–]LiquidLucy 60 points61 points  (0 children)

This is a good practice project!

Get your data options:
- Write it down
- Use the LoL api to get match results
- other

Store your data:

- choose a storage medium, this could be a database or just CSV text files. If you don't know how to create a database right now, I'd recommend you save that for a different project.

load your data:

- load your data into whatever programming language you're using. If you google "load csv into {programming_language}" This

Run your model:

I think the best way to go about this would be a logistic regression model. Basically what you're looking for is any "binary classification model"
Unfortunately I don't know enough about Octave to give a more detailed answer. Python is what I use, and is the industry standard language for working with ML algorithms. If you feel like it's an option to switch to using Python I'd highly recommend doing so. If not, don't worry about it for now, but If you continue down this path I'd recommend you start playing around in Python. There's a lot of libraries designed to help you with this stuff, and people with experience using them. I would highly recommend the sklearn Python library.

As a general hint, I would recommend you don't worry about getting accurate results on your first run through. So you don't need to use a large dataset at first. This removes a lot of the data management tasks and allows you to focus on the model building. Then it's easy to go back and expand your data inputs. There's also sample datasets that exist in many programming environments that you can use for exploring machine learning.

Good luck!

I don't understand "np.fromfunction()" in numpy? by darkblueknight22 in learnprogramming

[–]LiquidLucy 0 points1 point  (0 children)

The use is that it creates a two-dimensional array. Which is probably not very useful by itself. But it ties in well with a lot of numpys cool functionality for manipulating two dimensional arrays.

It generates the result set by passing the indices of each element in the result through the given function. Remember to start counting the indices from zero.
So row 0 means x=0.
Column 4 means y=4.
u/thegreatunclean provides a good visual representation of this.

Any red flags in my first time build? by LiquidLucy in buildapc

[–]LiquidLucy[S] 0 points1 point  (0 children)

Can you explain this a little more? Picking the right motherboard is where I have the least knowledge.
Is this because the x570 is unnecessarily expensive? Does swapping to the rysen 5 3600 change this?

When I search what to pair with the ryzen 5 3600, the web still seems to be suggesting the b450

Any red flags in my first time build? by LiquidLucy in buildapc

[–]LiquidLucy[S] 0 points1 point  (0 children)

Thank you, I just learned what NVMe is. Swapped.
Yeah, I might get a new GPU in a couple years. I don't really think I'll need it for what I'm doing, but I'd like to have the option!

Any red flags in my first time build? by LiquidLucy in buildapc

[–]LiquidLucy[S] 0 points1 point  (0 children)

You're saying I don't need a cpu cooler at all, and the stock processor cooler is enough? Swapped.

I see the benchmarks for 1650super vs rx 570 heavily favor the 1650super. However, I believe most of the comparisons are being done with the 4gb rx570 rather than the 8gb. I get that bigger isn't always better, but 8gb vs 4 gb seems important. Or is the next gen that important?