|
Yeah I’m looking for a black box essentially that I brute force into figuring out how to play the game via the final scoring. The problem is a lot of games I have in mind, poker for example, it’s impossible to know if a particular move is correct or not at the specific point in time. It has to be grounded against for tens of thousands of hands before you start to see if it’s a winning strategy or not. Not to mention things like bluffing Keep in mind I’m a complete newb when it comes to this field so if my aim is totally off you can point me towards a better methodology
|
# ? Jun 11, 2021 21:28 |
|
|
# ? May 31, 2024 04:12 |
|
Reinforcement learning works well for a lot of games, but poker is a special case that needs its own algorithms.
|
# ? Jun 11, 2021 21:37 |
|
Yeah poker specifically is the one i’ve been most interested in because it’s so hard. I may have to write something bespoke
|
# ? Jun 11, 2021 22:04 |
|
I haven't been following the research lately but the last I saw counterfactual regret minimization is the gold standard for poker AIs. It's very unlikely that you'll find something off the shelf for that, though.
|
# ? Jun 11, 2021 22:13 |
|
lol i literally just finished watching a 30 minute talk by the guys who just made the news with that technique. yeah what they did is way more advanced than what i’m capable of to be clear i’m not trying to solve it or anything. this is just for fun. i want to see if i can get something that can at least pass as a human player
|
# ? Jun 11, 2021 22:21 |
|
Depending on what you mean by that, it's at least extremely difficult. In general, one of the hardest problems in AI is creating systems that make the same sort of mistakes that humans do. You might get a poker bot that can compete with amateur players, but not something that passes the Turing test for poker.
|
# ? Jun 11, 2021 22:23 |
|
yeah that was worded awkwardly sorry. i’m just looking to wind up with something that’s actually playing the game and not going off a bunch of hard coded rules. ideally something that taught itself how to play. whatever pops out on the other side will probably have very strange behaviors that won’t at all be human but they’ll at least be… competent? this is just a side project / curiosity that i want to work on. i’m starting to think what i’m asking for may not exist though
|
# ? Jun 11, 2021 22:54 |
|
Are you talking about training a neural network to play poker ala AlphaGo? I don't think that's infeasible. That kind of thing has been done for boardgames by plenty of people. I was looking into trying to do something similar with a board game I play but couldn't find many good resources at the time.
|
# ? Jun 12, 2021 00:38 |
|
Yeah again i’m a total idiot when it comes to this stuff so while i’ve heard of alphago i have zero comprehension of the technical underpinnings of how it works. Let me type up a more thorough explanation of my vision tomorrow morning when I have some time. brb
|
# ? Jun 12, 2021 04:09 |
|
PIZZA.BAT posted:Yeah again i’m a total idiot when it comes to this stuff so while i’ve heard of alphago i have zero comprehension of the technical underpinnings of how it works. If you created a thread in CoC or project.log I'd read it. I find the area interesting but have been too bone idle so far to explore it myself, beyond reading about it
|
# ? Jun 12, 2021 10:47 |
|
PIZZA.BAT posted:Yeah again i’m a total idiot when it comes to this stuff so while i’ve heard of alphago i have zero comprehension of the technical underpinnings of how it works. If you just google search for "poker neural network" you'll get a bunch of github projects. Here's one at random that learns from playing itself (I think that was something you wanted): https://github.com/dickreuter/neuron_poker Also a ML thread seems like it would be a good idea but I don't have enough experience (or time these days) to start one.
|
# ? Jun 12, 2021 15:59 |
|
I don't think I can write an OP that people in CoC would be interested in, but I'd definitely follow a thread someone else wrote.
|
# ? Jun 12, 2021 16:45 |
|
What sort of stuff would constitute a good thread? I have a basic idea of how a lot of ML stuff works and some hands on experience with all kinds of ML (not reinforcement learning or game AI neural networks though). Happy to put a thread together, but I doubt I’m the most knowledgeable in the subject.
|
# ? Jun 12, 2021 17:10 |
|
Honestly? Just start a thread with an OP based on what you know, and reserve the second post to link to good posts from other people.
|
# ? Jun 12, 2021 18:22 |
|
I've wanted to get into contributing to open source projects for a while, but it always turns into a very daunting task. Both finding worthwhile projects and then figuring out how to contribute to them. Any tips? Or would there be any interest in starting a goon group to get things done together?
|
# ? Jun 13, 2021 20:35 |
|
Kuule hain nussivan posted:I've wanted to get into contributing to open source projects for a while, but it always turns into a very daunting task. Both finding worthwhile projects and then figuring out how to contribute to them. I have not done this beyond extremely minor things so I can't provide that much help but the little I have done has been from finding a project I actually use and care about which has open issues on GitHub? Usually popping into their slack or whatever chat channel or sending an email to the owners to ask if they accept PRs if I fork and make the fixes. Is there some friction there? If you mean contributing new features, I'd try starting with doing some maintenance/bug fixes since usually people don't want to do that and everyone wants to make new features.
|
# ? Jun 13, 2021 21:03 |
Contributing to a larger/older project is likely to take more effort, since they're more likely to have strict guidelines in place, and for anything larger than trivial bug fixes probably need to fit into a "vision" on some level. On the other hand with a smaller project it's more likely it might be on slow maintenance from the developer(s) and take much longer from you try to submit anything until you get a reaction. Regardless, one of the best moves is to try joining whatever IRC or Slack or other chat the project has and try asking for suggestions on things to work on. Remember that contributing to a project can also be writing documentation (for end users or for developers), or documenting reported bugs, like describing a reliable minimal reproduction or write a regression test for the bug. A fine entry point can even be setting up a development environment for yourself and documenting any trouble you had, to improve the developer documentation.
|
|
# ? Jun 13, 2021 22:15 |
|
So there's surely a better way to handle environment-specific configuration values and secrets than what I'm doing (which, to be clear, is effectively nothing.) It worked fine when it was just me on the team, but now our company is starting to add new developers and I want to clean this up so it's easier for anyone to deploy a new instance of our platform. Just want like, a centralized place where I can stick config values that can be read from both JavaScript and Python as well if at all possible. I have a feeling this is a solved problem already, I just don't apparently know how to find it myself online.
|
# ? Jun 17, 2021 20:18 |
|
This may well need its own thread. But I hope not. I need to take a HEX file and split it out into two HEX files for high and low bytes of 16 bit words. Long story short I built a Gigatron kit computer and not only do I have no way of programming a 27C1024 EPROM, but I accidentally bought the OTP version of the ROM. However I did dig out a couple of 8 bit flash chips. I can handle the hardware side and programming, but I just wanted to know if there was a way of splitting up a HEX file before I go and write a program to do it. So, do I have to do it or is there a solution already available?
|
# ? Jun 18, 2021 04:44 |
|
Protocol7 posted:So there's surely a better way to handle environment-specific configuration values and secrets than what I'm doing (which, to be clear, is effectively nothing.) Are you looking for environment variables? Or something platform specific like apples keychain?
|
# ? Jun 18, 2021 09:09 |
|
General_Failure posted:This may well need its own thread. But I hope not. You can probably do this with xxd and awk. You may find it easier to write a small utility.
|
# ? Jun 18, 2021 09:11 |
|
General_Failure posted:This may well need its own thread. But I hope not. This should be a very simple program. What languages are you familiar with? Here's a SO on reading a file byte by byte in python for example: https://stackoverflow.com/questions/1035340/reading-binary-file-and-looping-over-each-byte. After that all you have to do is alternately write the bytes to the two output files.
|
# ? Jun 18, 2021 14:59 |
|
leper khan posted:Are you looking for environment variables? Or something platform specific like apples keychain? I mean I guess environment variables would work fine for this, but I guess I didn't know if there was something better out there for that purpose.
|
# ? Jun 18, 2021 16:53 |
|
Protocol7 posted:I mean I guess environment variables would work fine for this, but I guess I didn't know if there was something better out there for that purpose. Everything other than env vars I know of is language or platform specific. Admittedly not something I worry about daily.
|
# ? Jun 18, 2021 17:39 |
|
I mean that should still work fine for my needs honestly. No reason to find another solution if that covers 99% of what I'm looking for and the support is already out there.
|
# ? Jun 18, 2021 17:49 |
|
HappyHippo posted:This should be a very simple program. What languages are you familiar with? Here's a SO on reading a file byte by byte in python for example: https://stackoverflow.com/questions/1035340/reading-binary-file-and-looping-over-each-byte. After that all you have to do is alternately write the bytes to the two output files. leper khan posted:You can probably do this with xxd and awk. You may find it easier to write a small utility. xxd is useful. I used it to turn a ROM file into an array recently so I could embed an emulator on a Pi Pico. I was thinking maybe using the ROM binary, divvying it out to high and low byte files, then hex-ifying them using xxd. Funny thing is earlier in the week I wrote most of a hex file generator for an Arduino Mega so I could dump an Apple 2 clone keyboard ROM. My program has bugs, but the ROM has much worse so I never bothered finishing it. Now I've got to do pretty much the opposite and do a hex reader. tbqh I have no idea how to use awk.
|
# ? Jun 19, 2021 00:48 |
|
I knocked out a little C program to split the ROM into high and low bytes. Or rather data and instruction. The Gigatron uses 8 bits for instruction and 8 bits for data on a 16 bit ROM. So endian-ness is pretty irrelevent. Now I just have to work out the rest. e: I threw together an Arduino Mega based programmer for the flash. Now I'm trying to get the flash to do something. The datasheet is horrendous. I can't work out if the writer liked puzzles, or was getting ready to leave with no notice. The waveform diagrams are the most helpful thing in it. General_Failure fucked around with this message at 08:36 on Jun 19, 2021 |
# ? Jun 19, 2021 02:41 |
|
Protocol7 posted:I mean that should still work fine for my needs honestly. No reason to find another solution if that covers 99% of what I'm looking for and the support is already out there. If you need to store secrets, there's always Vault.
|
# ? Jun 19, 2021 03:16 |
|
Just dropping in to say I solved the hex file splitting issue. I sort of circumvented the whole thing. What I did was wrote a small C program to split the ROM binary out into two files of alternating bytes. It took me a very long time, but eventually I got my breadboarded flash programmer to perform some basic functions to the flash chip. After looking at my options for sending the ROM files to the flash via serial I dug out a micro sd card module and just set it up to write a binary file from SD card to the flash chip. That was actually the easiest part. So now I have a couple of chips with what I need on them. Sorted!
|
# ? Jun 20, 2021 23:22 |
|
Wondering if anyone might be able to recommend a method in Python with which I could take a string of, lets say 80 characters (complete words/sentences), and break it into a list/array where each index is a new line... but the kicker is I don't want to throw to a new line if I am not pulling an entire word. Split seems like it would do some of what I want to do (keeping words together), and I found something on StackOverflow that would do the other half (split after a certain character count)... but I am not sure of a way to bridge the two. Someone pointed me towards regular expressions, but I'm not sure I fully understand what is going on by using something like that.
|
# ? Jun 21, 2021 19:16 |
|
Gin_Rummy posted:Wondering if anyone might be able to recommend a method in Python with which I could take a string of, lets say 80 characters (complete words/sentences), and break it into a list/array where each index is a new line... but the kicker is I don't want to throw to a new line if I am not pulling an entire word. It sounds like you want to make a function that implements a word wrap at n characters. What’s the definition of an “entire word,” like does hyphenation or multiple language support matter to your use case? quote:Split seems like it would do some of what I want to do (keeping words together), and I found something on StackOverflow that would do the other half (split after a certain character count)... but I am not sure of a way to bridge the two. Split may be annoying when it comes time to reconstruct whatever token you split on. I think generally you’ll want to start by taking a substring of n characters from the start of the source string. Determine if the end of the substring is in the middle of a “word” (likely) and if so backtrack to the nearest word boundary and put whatever’s left as its own line. Start your next substring of length n at the index in the source string where you ended up splitting the last one. quote:Someone pointed me towards regular expressions, but I'm not sure I fully understand what is going on by using something like that. I’m not sure this person has your best interest at heart, but maybe they meant use a regular expression to find a word boundary?
|
# ? Jun 21, 2021 21:07 |
|
Gin_Rummy posted:Wondering if anyone might be able to recommend a method in Python with which I could take a string of, lets say 80 characters (complete words/sentences), and break it into a list/array where each index is a new line... but the kicker is I don't want to throw to a new line if I am not pulling an entire word. So there are a lot of edge cases (some mentioned above) that you haven't specified. But a general approach would be to first split the string into a list of words (using split, or something fancier if that doesn't suit your requirements), then reassemble the words into lines, subject to the line length limit you have.
|
# ? Jun 21, 2021 21:30 |
|
This may by what you're looking for: https://docs.python.org/3/library/textwrap.html#textwrap.wrap
|
# ? Jun 21, 2021 22:40 |
|
I don't suppose anyone has good resources for working with LabView? I did a bit of work with it in college but now I'm trying to get a grasp on a pretty massive program and I'm not quite sure where to start
|
# ? Jun 22, 2021 01:00 |
|
StashAugustine posted:I don't suppose anyone has good resources for working with LabView? I did a bit of work with it in college but now I'm trying to get a grasp on a pretty massive program and I'm not quite sure where to start Oh, LabView. Haven't touched it since 1998, 2nd year in university. Can't say I miss it, though I'm sure it improved in the decades past.
|
# ? Jun 22, 2021 03:25 |
|
csammis posted:I’m not sure this person has your best interest at heart This made me laugh quite a bit and I forwarded it to the recommender. That being said, re.findall actually worked for me: quote:foo = re.findall(r".{20}\S*", bar) In any case, I appreciate all the suggestions. I think textwrap probably would have ended up being simpler to wrap my head around if I came by it first.
|
# ? Jun 22, 2021 05:22 |
|
I want to make something like this: https://pubgheatmap.net/; basically a replay webapp that uses an API to get the data. From looking through similar projects, it seems like React + Canvas for the frontend, and then GraphQL on the backend is pretty standard. I haven't done a ton of front-end stuff in the past, and have basically only used the MERN stack for those projects. The one thing that I think I'd like to change from that setup is the data processing - it looks like the way they deal with updating the telemetry data is one huge javascript file (https://github.com/mediusoft/PUBG-heatmap-frontend/blob/dev/src/models/Telemetry.parser.js), that updates a 'state' object over 400 or so lines. If possible, I'd rather use Python for populating the model data, and processing whatever I get back from the database (i.e., doing data manipulation/visualization in pandas/np/seaborn). Is this a situation where Flask would make sense slotted into the React/Canvas combo, or should I just be using Dash instead? I've only seen projects in Dash that are kind of basic dashboards for showing graphs and whatnot, but as far as I can tell it's basically just React in Python, so maybe it would be just as good? Is there some other combination that would be better? Basically I've got no idea what tool to use, I usually just do data/ML stuff that doesn't have much to do with anything front end, and am a bit lost re: what's best.
|
# ? Jun 23, 2021 03:54 |
|
I really like dash and would gladly answer any questions you want. Super easy to deploy to heroku. If a Python graphing library, plotly or cytoscapes can make the plot you want you can do the whole thing in Python. Is that the case here? If no it starts to be more complicated. EDIT: I reread your post and you said you can do it using seaborn. In that case you can probably use dash and you might check out plotly because it’s pretty but seaborn works too. Plotly has the advantage of being integrated in dash with dcc.Graph() EDIT2: https://plotly.com/python/animations/ CarForumPoster fucked around with this message at 14:30 on Jun 23, 2021 |
# ? Jun 23, 2021 04:45 |
|
That's exactly what I was wondering, thanks! It sounds like Dash would be a good fit. The one more complicated thing is the map itself - basically, it's a static image of the map with little dots and bullet tracers and stuff drawn on it. It sounds like it might be complicated to do with just the plotly animations, but it looks like there's a dash version of canvas, which is what I've used in React so that seems promising. I'm honestly kind of mad I didn't realize there was a version of this where I could be using Python instead of JS all along... If you're up for it I've got some very basic questions: Are there any go-to resources you'd suggest looking at for learning Dash? I'm comfortable with Python in general, but (as you can tell) very new to Dash. Is the Dash framework pretty similar to React? Ie, model-view-controller decomposition and whatnot? How do you handle getting data in Dash? I.e., in React I basically use Mongoose and Express; is there an equivalent set of things I should be looking at for Dash? E: more generally re the above, it looks like a lot of the examples load in data beforehand rather than ie asynchronously getting data from a server. Is that a design choice that's necessary, or just kind of because that's the form data happens to be in? Ie, you could do it either way, but usually don't have to. Thanks again for the help! foutre fucked around with this message at 18:35 on Jun 23, 2021 |
# ? Jun 23, 2021 18:27 |
|
|
# ? May 31, 2024 04:12 |
|
foutre posted:That's exactly what I was wondering, thanks! It sounds like Dash would be a good fit. The one more complicated thing is the map itself - basically, it's a static image of the map with little dots and bullet tracers and stuff drawn on it. It sounds like it might be complicated to do with just the plotly animations, but it looks like there's a dash version of canvas, which is what I've used in React so that seems promising. I'm honestly kind of mad I didn't realize there was a version of this where I could be using Python instead of JS all along... I haven't used React, although Dash uses React to render the UI (i.e. the webpage you interact with). The thing I like about Dash vs, say, Django, is you don't really need to think about any of those things you just said. You can make that pubg simulator without knowing what a MVC is. Just use the callback to run the python code you'd normally write for a regular python program. For example: If you have the data sitting on the server already you can load it when the app runs (for example using pandas like pd.read_csv() or pd.read_sql(). Callbacks run async by default in current Dash IIRC. So to make an app like the pubg simulator you linked where it starts with empty data and then updates it with a button press and lets say the match data is requested from a rest API, you'd just make the button use requests to hit the API. IDK if this code works I havent tested it or thought about it much, but should be the right concept: code:
CarForumPoster fucked around with this message at 22:41 on Jun 23, 2021 |
# ? Jun 23, 2021 22:16 |