VibeBuilders.ai Logo
VibeBuilders.ai

Accidentally

Explore resources related to accidentally to help implement AI solutions for your business.

My clients are obsessed with AI and it's driving me nuts – are there any actually useful AI tools for service businesses?
reddit
LLM Vibe Score0
Human Vibe Score-0.333
12131415161718190This week

My clients are obsessed with AI and it's driving me nuts – are there any actually useful AI tools for service businesses?

I have a roster of a few home service companies (plumbers, roofers, landscapers, etc.) that I do freelance marketing for. Lately, the owners I work with have developed a serious case of AI shiny object syndrome. They’re bombarding me with links to scammy IG ads for “game-changing” AI tools they think will save their businesses overnight. Even talking about replacing their CSRs with "virtual agents". This will obviously lead to some terrible customer experiences, but all they can see is dollar signs at the prospect of laying off that part of their labor force. If I keep pushing back and pointing out how short sighted some of these ideas are, they’ll eventually find someone else that will implement them. So, I’m trying to get out in front of this a little bit and find any AI tools that don’t suck—something I can pitch back to them that’s actually useful and not just a fancy new way to ruin their customer experience. Then when they brag to their other buddies in the trades about how "cutting edge" their business is, it will be in part because of me, not in spite of me. Any suggestions for AI tools that: Help small service businesses without completely alienating their customers? Automate repetitive tasks in a way that doesn’t scream “this was done by a robot”? Aren’t just some scammy overpriced subscription service with a flashy demo? If you’ve actually used something that works, I’d love to hear about it. Honestly, the bar is low. Just help me stop these guys from accidentally burning their businesses down with bad AI ideas.

My clients are obsessed with AI and it's driving me nuts – are there any actually useful AI tools for service businesses?
reddit
LLM Vibe Score0
Human Vibe Score-0.333
12131415161718190This week

My clients are obsessed with AI and it's driving me nuts – are there any actually useful AI tools for service businesses?

I have a roster of a few home service companies (plumbers, roofers, landscapers, etc.) that I do freelance marketing for. Lately, the owners I work with have developed a serious case of AI shiny object syndrome. They’re bombarding me with links to scammy IG ads for “game-changing” AI tools they think will save their businesses overnight. Even talking about replacing their CSRs with "virtual agents". This will obviously lead to some terrible customer experiences, but all they can see is dollar signs at the prospect of laying off that part of their labor force. If I keep pushing back and pointing out how short sighted some of these ideas are, they’ll eventually find someone else that will implement them. So, I’m trying to get out in front of this a little bit and find any AI tools that don’t suck—something I can pitch back to them that’s actually useful and not just a fancy new way to ruin their customer experience. Then when they brag to their other buddies in the trades about how "cutting edge" their business is, it will be in part because of me, not in spite of me. Any suggestions for AI tools that: Help small service businesses without completely alienating their customers? Automate repetitive tasks in a way that doesn’t scream “this was done by a robot”? Aren’t just some scammy overpriced subscription service with a flashy demo? If you’ve actually used something that works, I’d love to hear about it. Honestly, the bar is low. Just help me stop these guys from accidentally burning their businesses down with bad AI ideas.

My clients are obsessed with AI and it's driving me nuts – are there any actually useful AI tools for service businesses?
reddit
LLM Vibe Score0
Human Vibe Score-0.333
12131415161718190This week

My clients are obsessed with AI and it's driving me nuts – are there any actually useful AI tools for service businesses?

I have a roster of a few home service companies (plumbers, roofers, landscapers, etc.) that I do freelance marketing for. Lately, the owners I work with have developed a serious case of AI shiny object syndrome. They’re bombarding me with links to scammy IG ads for “game-changing” AI tools they think will save their businesses overnight. Even talking about replacing their CSRs with "virtual agents". This will obviously lead to some terrible customer experiences, but all they can see is dollar signs at the prospect of laying off that part of their labor force. If I keep pushing back and pointing out how short sighted some of these ideas are, they’ll eventually find someone else that will implement them. So, I’m trying to get out in front of this a little bit and find any AI tools that don’t suck—something I can pitch back to them that’s actually useful and not just a fancy new way to ruin their customer experience. Then when they brag to their other buddies in the trades about how "cutting edge" their business is, it will be in part because of me, not in spite of me. Any suggestions for AI tools that: Help small service businesses without completely alienating their customers? Automate repetitive tasks in a way that doesn’t scream “this was done by a robot”? Aren’t just some scammy overpriced subscription service with a flashy demo? If you’ve actually used something that works, I’d love to hear about it. Honestly, the bar is low. Just help me stop these guys from accidentally burning their businesses down with bad AI ideas.

My clients are obsessed with AI and it's driving me nuts – are there any actually useful AI tools for service businesses?
reddit
LLM Vibe Score0
Human Vibe Score-0.333
12131415161718190This week

My clients are obsessed with AI and it's driving me nuts – are there any actually useful AI tools for service businesses?

I have a roster of a few home service companies (plumbers, roofers, landscapers, etc.) that I do freelance marketing for. Lately, the owners I work with have developed a serious case of AI shiny object syndrome. They’re bombarding me with links to scammy IG ads for “game-changing” AI tools they think will save their businesses overnight. Even talking about replacing their CSRs with "virtual agents". This will obviously lead to some terrible customer experiences, but all they can see is dollar signs at the prospect of laying off that part of their labor force. If I keep pushing back and pointing out how short sighted some of these ideas are, they’ll eventually find someone else that will implement them. So, I’m trying to get out in front of this a little bit and find any AI tools that don’t suck—something I can pitch back to them that’s actually useful and not just a fancy new way to ruin their customer experience. Then when they brag to their other buddies in the trades about how "cutting edge" their business is, it will be in part because of me, not in spite of me. Any suggestions for AI tools that: Help small service businesses without completely alienating their customers? Automate repetitive tasks in a way that doesn’t scream “this was done by a robot”? Aren’t just some scammy overpriced subscription service with a flashy demo? If you’ve actually used something that works, I’d love to hear about it. Honestly, the bar is low. Just help me stop these guys from accidentally burning their businesses down with bad AI ideas.

Scratch Machine Learning Algorithms Implementations
reddit
LLM Vibe Score0
Human Vibe Score1
ParkMountainThis week

Scratch Machine Learning Algorithms Implementations

Hi there, other Redditors! Like many of you, when I first started working in the AI field, I wanted to build some basic Machine Learning models from scratch in order to better understand how each algorithm works, improve my programming and math skills, or simply produce an eye-catching, difficult project to put in the résumé. After spending some time searching for resources that could help me guide my studies, I discovered that the majority of scratch implementations that are currently available are either i) outdated (having been implemented years ago using Python 2 or an earlier version of Python 3); ii) too difficult to understand (using a lot of difficult, unfriendly optimization techniques or with poorly written code); or iii) too simple (only covering binary classification). With that in mind, I made the decision to develop user-friendly, uncomplicated, organized, and simple implementations from scratch. Aside from all of that, I've always wanted to create an open-source project so that others, particularly novices and those with less than a year's experience (like me), can collaborate with others, contribute to public projects, and experience Git firsthand (some of these implementations were made by other contributors!). Here are some implementations that are available: Algorithms (Random Forest Classifier and Regressor, Decision Tree Classifier and Regressor, KMeans, KNN Classifier and Regressor, Gaussian Naive Bayes, Linear Regression, Logistic Regression, PCA, Perceptron, MLP Classifier and Regressor, SVM Classifier and Regressor); Regression and classification metrics; Distance metrics (such as Euclidean); Data split functions (such as KFold); Activation and loss functions; Scalers (such as MinMaxScaler) and encoders (such as One Hot Encoder); and a few things more! Project's link: https://github.com/rafaelgreca/scratchml Disclaimer: The goal of this library is to provide code that is simpler, easier to understand, and more approachable for artificial intelligence enthusiasts and beginners who want to contribute to an open-source repository or who want to learn more about how algorithms work. It is not meant to replace existing libraries that are better, more optimized, and have a wider variety of implemented algorithms (such as scikit-learn, PyTorch, Keras, and Tensorflow). If you want to use optimized implementations with accurate results, please use one of the previously mentioned libraries. P.S.: I accidentally deleted the other post, so I am posting again. :-)

[N] OpenAI's new language model gpt-3.5-turbo-instruct can defeat chess engine Fairy-Stockfish 14 at level 5
reddit
LLM Vibe Score0
Human Vibe Score1
WiskkeyThis week

[N] OpenAI's new language model gpt-3.5-turbo-instruct can defeat chess engine Fairy-Stockfish 14 at level 5

This Twitter thread (Nitter alternative for those who aren't logged into Twitter and want to see the full thread) claims that OpenAI's new language model gpt-3.5-turbo-instruct can "readily" beat Lichess Stockfish level 4 (Lichess Stockfish level and its rating) and has a chess rating of "around 1800 Elo." This tweet shows the style of prompts that are being used to get these results with the new language model. I used website parrotchess\[dot\]com (discovered here) (EDIT: parrotchess doesn't exist anymore, as of March 7, 2024) to play multiple games of chess purportedly pitting this new language model vs. various levels at website Lichess, which supposedly uses Fairy-Stockfish 14 according to the Lichess user interface. My current results for all completed games: The language model is 5-0 vs. Fairy-Stockfish 14 level 5 (game 1, game 2, game 3, game 4, game 5), and 2-5 vs. Fairy-Stockfish 14 level 6 (game 1, game 2, game 3, game 4, game 5, game 6, game 7). Not included in the tally are games that I had to abort because the parrotchess user interface stalled (5 instances), because I accidentally copied a move incorrectly in the parrotchess user interface (numerous instances), or because the parrotchess user interface doesn't allow the promotion of a pawn to anything other than queen (1 instance). Update: There could have been up to 5 additional losses - the number of times the parrotchess user interface stalled - that would have been recorded in this tally if this language model resignation bug hadn't been present. Also, the quality of play of some online chess bots can perhaps vary depending on the speed of the user's hardware. The following is a screenshot from parrotchess showing the end state of the first game vs. Fairy-Stockfish 14 level 5: https://preview.redd.it/4ahi32xgjmpb1.jpg?width=432&format=pjpg&auto=webp&s=7fbb68371ca4257bed15ab2828fab58047f194a4 The game results in this paragraph are from using parrotchess after the forementioned resignation bug was fixed. The language model is 0-1 vs. Fairy-Stockfish level 7 (game 1), and 0-1 vs. Fairy-Stockfish 14 level 8 (game 1). There is one known scenario (Nitter alternative) in which the new language model purportedly generated an illegal move using language model sampling temperature of 0. Previous purported illegal moves that the parrotchess developer examined turned out (Nitter alternative) to be due to parrotchess bugs. There are several other ways to play chess against the new language model if you have access to the OpenAI API. The first way is to use the OpenAI Playground as shown in this video. The second way is chess web app gptchess\[dot\]vercel\[dot\]app (discovered in this Twitter thread / Nitter thread). Third, another person modified that chess web app to additionally allow various levels of the Stockfish chess engine to autoplay, resulting in chess web app chessgpt-stockfish\[dot\]vercel\[dot\]app (discovered in this tweet). Results from other people: a) Results from hundreds of games in blog post Debunking the Chessboard: Confronting GPTs Against Chess Engines to Estimate Elo Ratings and Assess Legal Move Abilities. b) Results from 150 games: GPT-3.5-instruct beats GPT-4 at chess and is a \~1800 ELO chess player. Results of 150 games of GPT-3.5 vs stockfish and 30 of GPT-3.5 vs GPT-4. Post #2. The developer later noted that due to bugs the legal move rate was actually above 99.9%. It should also be noted that these results didn't use a language model sampling temperature of 0, which I believe could have induced illegal moves. c) Chess bot gpt35-turbo-instruct at website Lichess. d) Chess bot konaz at website Lichess. From blog post Playing chess with large language models: Computers have been better than humans at chess for at least the last 25 years. And for the past five years, deep learning models have been better than the best humans. But until this week, in order to be good at chess, a machine learning model had to be explicitly designed to play games: it had to be told explicitly that there was an 8x8 board, that there were different pieces, how each of them moved, and what the goal of the game was. Then it had to be trained with reinforcement learning agaist itself. And then it would win. This all changed on Monday, when OpenAI released GPT-3.5-turbo-instruct, an instruction-tuned language model that was designed to just write English text, but that people on the internet quickly discovered can play chess at, roughly, the level of skilled human players. Post Chess as a case study in hidden capabilities in ChatGPT from last month covers a different prompting style used for the older chat-based GPT 3.5 Turbo language model. If I recall correctly from my tests with ChatGPT-3.5, using that prompt style with the older language model can defeat Stockfish level 2 at Lichess, but I haven't been successful in using it to beat Stockfish level 3. In my tests, both the quality of play and frequency of illegal attempted moves seems to be better with the new prompt style with the new language model compared to the older prompt style with the older language model. Related article: Large Language Model: world models or surface statistics? P.S. Since some people claim that language model gpt-3.5-turbo-instruct is always playing moves memorized from the training dataset, I searched for data on the uniqueness of chess positions. From this video, we see that for a certain game dataset there were 763,331,945 chess positions encountered in an unknown number of games without removing duplicate chess positions, 597,725,848 different chess positions reached, and 582,337,984 different chess positions that were reached only once. Therefore, for that game dataset the probability that a chess position in a game was reached only once is 582337984 / 763331945 = 76.3%. For the larger dataset cited in that video, there are approximately (506,000,000 - 200,000) games in the dataset (per this paper), and 21,553,382,902 different game positions encountered. Each game in the larger dataset added a mean of approximately 21,553,382,902 / (506,000,000 - 200,000) = 42.6 different chess positions to the dataset. For this different dataset of \~12 million games, \~390 million different chess positions were encountered. Each game in this different dataset added a mean of approximately (390 million / 12 million) = 32.5 different chess positions to the dataset. From the aforementioned numbers, we can conclude that a strategy of playing only moves memorized from a game dataset would fare poorly because there are not rarely new chess games that have chess positions that are not present in the game dataset.

[D] Playing big league at home on a budget?
reddit
LLM Vibe Score0
Human Vibe Score0.778
ballerburg9005This week

[D] Playing big league at home on a budget?

I am a hobbyist and my Nvidia 660 is 10 years old and only has 2GB. Obviously that isn't going to cut it nowadays anymore. I am thinking about options here. I don't have thousands and thousands of dollars. And I highly doubt that spending close to a thousand dollars on a brand new card is still viable in 2020-2022. I wanted to use Wavenet today and then found out about Melnet. I mean, maybe I could run Wavenet but nobody in their right mind wants to after hearing Melnet results. On Github this one guy complained he couldn't get his implementation to work due to OOM with 2x 2080 RTX, which he bought solely for this purpose. Then on the other repo the guy casually mentioned that tier XY doesn't fit with some 10 year old lowfi dataset, even with batch size 1, on a 16GB Tesla P100. The wisdom for OOM has always been "decrease batch size". But as far as I can tell, for most of any of the interesting stuff in the last 8 years or so you simply can't decrease batch size. Either because batch sizes are already so tiny, or because the code is written in a way that would require you to somehow turn it inside out, probably involving extreme knowledge of higher mathematics. I am a hobbyist, not a researcher. I am happy if I crudely can grasp what is going on. Most of anything in the field suffers from exactly the same issue: It simply won't run without utterly absurd amounts of VRAM. So what about buying shitty cheapo AMD GPUs with lots of VRAM? This seems to be the sensible choice if you want to be able to run anything noteworthy at all that comes up in the next 2 years and maybe beyond. People say, don't but AMD its slow and it sucks, but those are apparently the same people that buy a 16GB Titan GPU for $1500 three times on Ebay without hesitation, when there are also 16GB AMD GPUs for $300. How much slower are AMD GPUs really? Let's say they are 5 times cheaper so they could be just 5 times slower. So I have to train my model over night instead of seeing the result in the afternoon. That would be totally awesome!; given that the alternative is to buy a $300 Nvidia GPU, which has maybe 4 or 6GB and simply can't run the code without running out of memory. And say $300 is not enough, let's buy a $700 RTX 3080. It still only has 10GB of VRAM not even 16GB. Then its just as useless! What's the point of buying a fast GPU if it can't even run the code? I don't know how much slower AMD GPUs really are. Maybe they are not 5x but 50x slower. Then of course training a model that was developed on some 64GB Tesla might take month and years. But maybe speed is not the issue, only memory. I have seen some stuff even being optimized for CPU, apparently because there weren't any big enough GPUs around. I don't really know how viable that can be (it seems rarely if ever it is), I have no experience. And what about renting AWS? Let's say, I am a beginner and I want to toy around for a week and probably max out 4 Teslas like 80% of the time without really getting anywhere. How expensive is that? $25, $50, $100, $500? (Found the answer: fucking $2000 https://aws.amazon.com/ec2/instance-types/p3/ ) Ok, so AWS is bullshit, here its 6x cheaper: https://vast.ai/console/create/ . They don't really have 4x 16GB V100 though, just one V100. $0.5 per hour 24 7 = $84 per month (there are more hidden cost like bandwidth, it doesn't seem to be huge but I never used this so don't take it at face value). On AWS the same is over $3 per hour. So a day is $12, this could be viable! (look at calculation below). There really isn't much info on the net about hardware requirements and performance for machine learning stuff. What bothers me the most is that people seem to be very ignorant of the VRAM issue. Either because they aren't looking ahead of what might come in 1-2 years. Or because they are simply so rich they have no issue spending thousands and thousands of dollars every year instead of just 500 every couple of years. Or maybe they are both. So, yeah, what are your thoughts? Here is what I found out just today: Until 2 years ago, tensorflow and pytorch wouldn't work with AMD cards, but this has changed. https://rocmdocs.amd.com/en/latest/Deep_learning/Deep-learning.html For older cards though, ROCm only works with certain CPUs: it needs PCIe 3.0 with atomics (see: https://github.com/RadeonOpenCompute/ROCm ). So you can't simply buy any 16GB card for $300 on Ebay like I suggested, even if it supports ROCm, because it will only work for "newer" PCs. The newer GFX9 AMD cards (like Radeon VII and Vega) don't suffer from this problem and work with PCIe 2.0 again... Although I have seen 16GB Vega cards for like $350 on Ebay, I think that is a pretty rare catch. However looking 1-2 years in the future, this is great because Radeon VII prices will be hugely inflated by Nvidia 3000 series hype (maybe down to $180 even) and maybe the next gen cards from AMD even have 24 or 32GB for $500-$1000 and can still run on old machines. According to this https://arxiv.org/pdf/1909.06842.pdf Radeon VII 16GB performs only half as good as Tesla V100 16GB, whereas V100 should be roughly along the lines of 11GB RTX 2080 Ti. So you could say that you get half the RAM, double the speed, double the price. I am not sure though if that holds. I think they were putting 16GB in those cards trying to push it for ML with ROCm, clearly addressing the problem of the time, but no one really jumped on the train and now Resnet shrinks RAM but needs more processing power. So they released 8GB cards again with slightly better performance, and I guess we are lucky if the next generation even has 16GB because games probably don't need it at all. Still though with Revnets and everything said in the comments, I think on a budget you are better on the safe side buying the card with the most amount of VRAM, rather than the most performance. Tomorrow some paper might come out that uses another method, then you can't trick-shrink your network anymore and then everyone needs to buy big ass cards again like it used to be and can do nothing but throw their fancy faster cards in the dumpster. Also the huge bulk of ML currently focuses on image processing, while sound has only been gaining real momentum recently and this will be followed by video processing and eventually human-alike thought processes that sit atop of all that and have not even been tackled yet. Its a rapidly evolving field, hard to predict what will come and stay. Running out of VRAM means total hardware failure, running slower just means waiting longer. If you just buy the newest card every year, its probably save to buy the fast card because things won't change that fast after all. If you buy a new card every 4 years or longer then just try to get as much VRAM as possible. Check this out: https://www.techspot.com/news/86811-gigabyte-accidentally-reveals-rtx-3070-16gb-rtx-3080.html There will be a 3070 16GB version! Let's compare renting one V100 at $12/day vs. buying a 3070 Ti 16GB: The 2080 Ti was 1.42x the price of the regular 2080 and released the next summer. So let's assume the same will be true to the 3070 Ti so it will cost $700. That is $30/month & $1.88/day for two years - $15/month & $0.94/day in four years (by which time you can probably rent some 32GB Tesla card for the same price and nothing recent runs on less anymore). If you max out your setup 24/7 all year, then power cost obviously becomes a huge factor to that figure. In my country running at 500W cost $4.21/day, or $1.60 / 9hrs overnight. If you live elsewhere it might be as much as a quarter of that price. Of course your PC may run 10h a day anyway, so its maybe just 300W plus, and an older graphics card is inefficient for games it eats more Watts to do the same things so you save some there as well. There is a lot to take into account if comparing. Anyway, factoring in power cost, to break even with buying the card vs. renting within two years, you would have to use it for at least 4 days a month, or almost 2 weeks every 3 month. If you use it less than that, you maybe have a nice new graphics card and less hassle with pushing stuff back and forth onto servers all the time. But it would have been more economic to rent. So renting isn't that bad after all. Overall if you are thinking about having this as your hobby, you could say that it will cost you at least $30 per month, if not $50 or more (when keeping up to date with cards every 2 instead of 4 years + using it more cost more power). I think that is quite hefty. Personally I am not even invested enough into this even if it wasn't over my finances. I want a new card of course and also play some new games, but I don't really need to. There are a lot of other (more) important things I am interested in, that are totally free.

[D] if your company is ingesting work emails and chats for AI/ML pipelines, is there concern around sensitive business info getting out?
reddit
LLM Vibe Score0
Human Vibe Score1
Efficient-Proof-1824This week

[D] if your company is ingesting work emails and chats for AI/ML pipelines, is there concern around sensitive business info getting out?

Edit: to be more specific - around sensitive raw data/metadata being dumped in system logs and accidentally viewed by an insider Hi folks Firstly full disclosure I’m the CEO of DataFog (www.datafog.ai). This is NOT a sales pitch but rather an interest in hearing what the community thinks about the overall issue which I believe will ultimately be solved via an ML-based implementation. My contention is: Generative AI has catalyzed widespread practice of ingesting email and work chat content to power AI training and inference this introduces a risk of content concerning confidential corporate affairs\ that can pass most privacy filters This results in Raw data alluding to sensitive business events flowing in freely for easy accidental unauthorized access by an internal - like MLOps - user My second contention is that the current security tools may not offer adequate coverage for what will be an evolving ongoing need that run of the mill PII redactors can’t account for. Take this statement which might easily be found in the inbox of the C-Suite for one of these two companies under “CiscoAcqPR\_Draft.docx” or the like: Cisco offered $157 in cash for each share of Splunk, representing a 31% premium to the company's last closing price. I myself have run various merger docs and legal filings through some standard PII tools and all of them fail to redact mention of deal terms. ~~A model training on phrases like “ $157 in cash per share” could have negative downstream inferential consequences or~~ if viewed accidentally by someone internally without the right access privileges How’re you all thinking about this problem? Custom recognizers are a common option like what you see with Microsoft Presidio but I’ve heard from some that maintaining those can be a PITA. At big companies this has been solved through internal tooling. \*more than Personally Identifiable Information (PII), HIPAA, or customer transaction data. It’s about those emails the CEO has sent to the Board of Directors in the midst of a corporate crisis, or the email thread between the C-Suite regarding an upcoming Earnings Call, or the market-moving announcement in the works regarding a merger with a competitor. In other words, Non-PII content that still needs to be redacted.

Detailed Guide - How I've Been Self Employed for 2 Years Selling Posters
reddit
LLM Vibe Score0
Human Vibe Score1
tommo278This week

Detailed Guide - How I've Been Self Employed for 2 Years Selling Posters

Hey everyone, bit of context before you read through this. I have been selling POD posters full time for over 2 years now. My next venture is that I have started my own Print on Demand company for posters, PrintShrimp. As one way of creating customers for our service, we are teaching people for free how to also sell posters. Here is a guide I have written on how to sell posters on Etsy. Feel free to have a read through and then check out PrintShrimp, hopefully can help some of you guys out (and get us some more customers!) All of this is also available in video format on our website too, if you prefer to learn that way. Thanks guys! And as some people asked in other subs, no this isn't written with AI 😅 This took a couple of weeks to put together! Through this guide, we will teach you everything you need to know about starting to sell posters and generate some income. We will also show you why PrintShrimp is the best POD supplier for all of your poster needs. Trust me, you won’t need much convincing.  So, why are posters the best product to sell? Also, just thought I’d quickly answer the question - why posters? If you’ve been researching Print on Demand you’ve probably come across the infinite options of t-shirts, mugs, hats, phone cases, and more. All of these are viable options, however we think posters are the perfect place to start. You can always expand into other areas further down the line! So a brief summary of why posters are the perfect product for Print on Demand: \-They are very easy to design! Posters are a very easy shape to deal with - can’t go wrong with a rectangle. This makes designing products very easy. \-Similarly to this, what you see is what you get with a poster. You can literally see your finished product as you design it in either canva or photoshop. With T-Shirts for example, you have to make your design, and then place it on a t-shirt. Then you have to coordinate with your printers the size you would like the design on the tshirt and many other variables like that. There is no messing about with posters - what you see is what you get. \-The same high quality, everywhere. With other products, if you want to reap the benefits of a printing in various countries, you need to ensure each of your global suppliers stocks the same t-shirts, is able to print in the same way, carries the same sizes etc. Again with posters you avoid all of this hassle- your products will come out the same, no matter which of our global locations are used. \-They have a very favorable profit margin. As you will see later, the cost price of posters is very low. And people are prepared to pay quite a lot for a decent bit of wall art! I have tried out other products, and the profit margin combined with the order quantity of posters makes them my most profitable product, every single time. Using PrintShrimp, you can be sure to enjoy profits of anywhere between £6 - £40 pure profit per sale.  \-They are one of the easiest to print white label. This makes them perfect for Print on Demand. Your posters are simply put in a tube, and off they go. There are no extras you need to faff around with, compared to the extra elements other products come with, such as clothing labels on t-shirts.  Picking your poster niche So, you are ready to start selling posters. Great! Now, the blessing and curse with selling posters is that there are infinite possibilities regarding what you can sell. So, it can easily be quite overwhelming at first.  The first thing I would recommend doing is having a look at what others are selling. Etsy is a wonderful place for this (and will likely be a key part of your poster selling journey). So, log on to Etsy and simply type in ‘poster’ in the search bar. Get ready to write a massive list of the broad categories and type of posters that people are selling.  If you do not have more than 50 categories written down by the end, you are doing something wrong. There are seriously an infinite amount of posters! For example, here are some popular ones to get you started: Star sign posters, Kitchen posters, World map posters, Custom Dog Portrait posters, Music posters, Movie posters, Fine art posters, Skiing posters, Girl Power posters and Football posters.  Now, you have a huge list of potential products to sell. What next? There are a few important things you need to bear in mind when picking your niche: \-Does this interest me?  Don’t make the mistake of going down a niche that didn’t actually interest you just because it would probably be a money maker. Before you know it, what can be a very fun process of making designs can become incredibly \\\monotonous, and feel like a chore\\\. You need to bear in mind that you will be spending a lot of time creating designs - if it is something you are interested in you are much less likely to get burnt out! As well, \\\creativity will flow\\\ far better if it is something you are interested in, which at the end of the day will lead to better designs that are more likely to be purchased by customers.  \-Is this within my design range? Don’t let this put you off too much. We will go through how to get started on design later on in this guide. However, it is important to note that the plain truth of it is that some niches and designs are a hell of a lot more complicated than others. For example, quote posters can essentially be designed by anyone when you learn about how to put nice fonts together in a good color scheme. On the other hand, some posters you see may have been designed with complex illustrations in a program like Illustrator. To start with, it may be better to pick a niche that seems a bit more simple to get into, as you can always expand your range with other stores further down the line. A good way of evaluating the design complexity is by identifying if this poster is \\\a lot of elements put together\\\ or is \\\a lot of elements created by the designer themselves\\\\\.\\ Design can in a lot of cases be like a jigsaw - putting colours, shapes and text together to create an image. This will be a lot easier to start with and can be learnt by anyone, compared to complex drawings and illustrations.  \-Is this niche subject to copyright issues? Time to delve deep into good old copyright. Now, when you go through Etsy, you will without a doubt see hundreds of sellers selling music album posters, car posters, movie posters and more. Obviously, these posters contain the property of musicians, companies and more and are therefore copyrighted. The annoying thing is - these are \\\a complete cash cow.\\\ If you go down the music poster route, I will honestly be surprised if you \\don’t\\ make thousands. However it is only a matter of time before the copyright strikes start rolling in and you eventually get banned from Etsy.  So I would highly recommend \\\not making this mistake\\\. Etsy is an incredible platform for selling posters, and it is a hell of a lot easier to make sales on there compared to advertising your own website. And, you \\\only get one chance on Etsy.\\\ Once you have been banned once, you are not allowed to sign up again (and they do ID checks - so you won’t be able to rejoin again under your own name).  So, don’t be shortsighted when it comes to entering Print on Demand. If you keep your designs legitimate, they will last you a lifetime and you will then later be able to crosspost them to other platforms, again without the worry of ever getting shut down.  So, how do I actually design posters? Now you have an idea of what kind of posters you want to be making, it’s time to get creative and make some designs! Photoshop (and the creative cloud in general) is probably the best for this. However, when starting out it can be a scary investment (it costs about £30 a month unless you can get a student rate!).  So, while Photoshop is preferable in the long term, when starting out you can learn the ropes of design and get going with Canva. This can be great at the start as they have a load of templates that you can use to get used to designing and experimenting (while it might be tempting to slightly modify these and sell them - this will be quite saturated on places like Etsy so we would recommend doing something new).  What size format should I use? The best design format to start with is arguably the A sizes - as all the A sizes (A5, A4, A3, A2, A1, A0) are scalable. This means that you can make all of your designs in one size, for example A3, and these designs will be ready to fit to all other A sizes. For example, if you design an A3 poster and someone orders A1, you can just upload this A3 file to PrintShrimp and it will be ready to print. There is a wide range of other sizes you should consider offering on your shop, especially as these sizes are very popular with the American market. They have a wide range of popular options, which unfortunately aren’t all scalable with each other. This does mean that you will therefore have to make some slight modifications to your design in order to be able to offer them in American sizing, in a few different aspect ratios. What you can do however is design all of your products in UK sizing, and simply redesign to fit American sizing once you have had an order. Essentially: design in UK sizing, but list in both UK and US sizing. Then when you get a non-A size order, you can quickly redesign it on demand. This means that you don’t have to make a few different versions of each poster when first designing, and can simply do a quick redesign for US sizing when you need to. Below is PrintShrimps standard size offering. We can also offer any custom sizing too, so please get in touch if you are looking for anything else. With these sizes, your poster orders will be dispatched domestically in whatever country your customer orders from. Our recommendations for starting design One thing that will not be featured in this guide is a written out explanation or guide on how to design. Honestly, I can’t think of a more boring, or frankly worse, way to learn design. When it comes to getting started, experimenting is your best friend! Just have a play around and see what you can do. It is a really fun thing to get started with, and the satisfaction of when a poster design comes together is like no other. A good way to start is honestly by straight up copying a poster you see for sale online. And we don’t mean copying to sell! But just trying to replicate other designs is a great way to get a feel for it and what you can do. We really think you will be surprised at how easy it is to pull together a lot of designs that at first can appear quite complicated! Your best friend throughout this whole process will be google. At the start you will not really know how to do anything - but learning how to look into things you want to know about design is all part of the process. At first, it can be quite hard to even know how to search for what you are trying to do, but this will come with time (we promise). Learning how to google is a skill that you will learn throughout this process.  Above all, what we think is most important is this golden rule: take inspiration but do not steal. You want to be selling similar products in your niche, but not copies. You need to see what is selling in your niche and get ideas from that, but if you make designs too similar to ones already available, you won’t have much luck. At the end of the day, if two very similar posters are for sale and one shop has 1000 reviews and your newer one has 2, which one is the customer going to buy? You need to make yours offer something different and stand out enough to attract customers. Etsy SEO and maximizing your sales You may have noticed in this guide we have mentioned Etsy quite a few times! That is because we think it is hands down the best place to start selling posters. Why? Etsy is a go to place for many looking to decorate their homes and also to buy gifts. It might be tempting to start selling with your own website straight away, however we recommend Etsy as it brings the customers to you. For example, say you start selling Bathroom Posters. It is going to be a hell of a lot easier to convert sales when you already have customers being shown your page after searching ‘bathroom decor’, compared to advertising your own website. This is especially true as it can be hard to identify your ideal target audience to then advertise to via Meta (Facebook/Instagram) for example. Websites are a great avenue to explore eventually like I now have, but we recommend starting with Etsy and going from there. What costs do I need to be aware of? So, setting up an Etsy sellers account is currently costs £15. The only other upfront cost you will have is the cost of listing a product - this is 20 cents per listing. From then on, every time you make a sale you will be charged a transaction fee of 6.5%, a small payment processing fee, plus another 20 cents for a renewed listing fee. It normally works out to about 10% of each order, a small price to pay for all the benefits Etsy brings. No matter what platform you sell on, you will be faced with some form of transaction fee. Etsy is actually quite reasonable especially as they do not charge you to use their platform on a monthly basis.  What do I need to get selling? Getting your shop looking pretty \-Think of a shop name and design (now you are a professional designer) a logo \-Design a banner for the top of your shop \-Add in some about me info/shop announcement \-I recommend running a sale wherein orders of 3+ items get a 20% of discount. Another big benefit of PrintShrimp is that you receive large discounts when ordering multiple posters. This is great for attracting buyers and larger orders.  Making your products look attractive That is the bulk of the ‘decor’ you will need to do. Next up is placing your posters in mock ups! As you may notice on Etsy, most shops show their posters framed and hanging on walls. These are 99% of the time not real photos, but digital mock ups. This is where Photoshop comes in really handy, as you can automate this process through a plug in called Bulk Mock Up. If you don’t have photoshop, you can do this on Canva, you will just have to do it manually which can be rather time consuming.  Now, where can you get the actual Mock Ups? One platform we highly recommend for design in general is platforms like Envato Elements. These are design marketplaces where you have access to millions of design resources that you are fully licensed to use!  Titles, tags, and descriptions  Now for the slightly more nitty gritty part. You could have the world's most amazing looking poster, however, if you do not get the Etsy SEO right, no one is going to see it! We will take you through creating a new Etsy listing field by field so you can know how to best list your products.  The key to Etsy listing optimisation is to maximise. Literally cram in as many key words as you possibly can! Before you start this process, create a word map of anything you can think of relating to your listing. And come at this from the point of view of, if I was looking for a poster like mine, what would I search? Titles \-Here you are blessed with 140 characters to title your listing. Essentially, start off with a concise way of properly describing your poster. And then afterwards, add in as many key words as you can! Here is an example of the title of a well selling Skiing poster: Les Arcs Skiing Poster, Les Arcs Print, Les Alpes, France Ski Poster, Skiing Poster, Snowboarding Poster, Ski Resort Poster Holiday, French This is 139 characters out of 140 - you should try and maximise this as much as possible! As you can see, this crams in a lot of key words and search terms both related to Skiing as a whole, the poster category, and then the specifics of the poster itself (Les Arcs resort in France). Bear in mind that if you are listing a lot of listings that are of the same theme, you won’t have to spend time creating an entirely new title. For example if your next poster was of a ski resort in Italy, you can copy this one over and just swap out the specifics. For example change “France ski poster” to “Italy ski poster”, change “Les Arcs” to “The Dolomites”, etc.  Description \-Same logic applies for descriptions - try and cram in as many key words as you can! Here is an example for a Formula One poster: George Russell, Mercedes Formula One Poster  - item specific keywords Bright, modern and vibrant poster to liven up your home.  - Describes the style of the poster All posters are printed on high quality, museum grade 200gsm poster paper. Suitable for framing and frames. - Shows the quality of the print. Mentions frames whilst showing it comes unframed Experience the thrill of the racetrack with this stunning Formula One poster. Printed on high-quality paper, this racing car wall art print features a dynamic image of a Formula One car in action, perfect for adding a touch of speed and excitement to any motorsports room or man cave. Whether you're a die-hard fan or simply appreciate the adrenaline of high-speed racing, this poster is sure to impress. Available in a range of sizes, it makes a great addition to your home or office, or as a gift for a fellow Formula One enthusiast. Each poster is carefully packaged to ensure safe delivery, so you can enjoy your new piece of art as soon as possible. - A nice bit of text really highlighting a lot of key words such as gift, motorsports, racetrack etc.  You could go further with this too, by adding in extra things related to the poster such as ‘Perfect gift for a Mercedes F1 fan’ etc.  Tags Now, these are actually probably the most important part of your listing! You get 13 tags (20 character limit for each) and there are essentially search terms that will match your listing with what customers search for when shopping.  You really need to maximize these - whilst Title and Description play a part, these are the main things that will bring buyers to your listing. Once again, it is important to think about what customers are likely to be searching when looking for a poster similar to yours. Life hack alert! You can actually see what tags other sellers are using. All you need to do is go to a listing similar to yours that is selling well, scroll down and you can actually see them listed out at the bottom of the page! Here is an example of what this may look like: So, go through a few listings of competitors and make notes on common denominators that you can integrate into your listing. As you can see here, this seller uses tags such as ‘Birthday Gift’ and ‘Poster Print’. When you first start out, you may be better off swapping these out for more listing specific tags. This seller has been on Etsy for a few years however and has 15,000+ sales, so are more likely to see success from these tags.  If it’s not clear why, think about it this way. If you searched ‘poster print’ on Etsy today, there will be 10s of thousands of results. However, if you searched ‘Russell Mercedes Poster’, you will (as of writing) get 336 results. Etsy is far more likely to push your product to the top of the latter tag, against 300 other listings, rather than the top of ‘Poster Print’ where it is incredibly competitive. It is only when you are a more successful shop pulling in a high quantity of orders that these larger and more generic tags will work for you, as Etsy has more trust in your shop and will be more likely to push you to the front.  SKUs \-One important thing you need to do is add SKUs to all of your products! This is worth doing at the start as it will make your life so much easier when it comes to making sales and using PrintShrimp further down the line. What is an SKU? It is a ‘stock keeping unit’, and is essentially just a product identifier. Your SKUs need to match your file name that you upload to PrintShrimp. For example, if you made a poster about the eiffel tower, you can literally name the SKU eiffel-tower. There is no need to complicate things! As long as your file name (as in the image name of your poster on your computer) matches your SKU, you will be good to go.  \-It may be more beneficial to set up a system with unique identifiers, to make organising your files a lot easier further down the line. Say you get to 1000 posters eventually, you’ll want to be able to quickly search a code, and also ensure every SKU is always unique, so you won’t run into accidentally using the same SKU twice further down the line. For example, you can set it up so at the start of each file name, you have \[unique id\]\[info\], so your files will look like -  A1eiffeltower A2france And further down the line: A99aperolspritz B1potatoart This not only removes the potential issue of duplicating SKUs accidentally (for example if you made a few posters of the same subject), but also keeps your files well organised. If you need to find a file, you can search your files according to the code, so just by searching ‘a1’ for example, rather than having to trawl through a load of different files until you find the correct one. \-If your poster has variations, for example color variations, you can set a different SKU for each variation. Just click the little box when setting up variations that says ‘SKUs vary for each (variation)’. So if you have a poster available either in a white or black background, you can name each file, and therefore each SKU, a1eiffel-tower-black and a1eiffel-tower-white for example. \-The same goes for different sizes. As different American sizes have different aspect ratios, as mentioned above you may have to reformat some posters if you get a sale for one of these sizes. You can then add in the SKU to your listing once you have reformatted your poster. So for example if you sell a 16x20” version of the eiffel tower poster, you can name this file eiffel-tower-white-1620. Whilst this involves a little bit of set up, the time it saves you overall is massive!  Variations and Prices \-So, when selling posters there is a huge variety of sizes that you can offer, as mentioned previously. Non-negotiable is that you should be offering A5-A1. These will likely be your main sellers! Especially in the UK. It is also a good idea to offer inch sizing to appeal to a global audience (as bear in mind with PrintShrimp you will be able to print in multiple countries around the world!).  Below is a recommended pricing structure of what to charge on Etsy. Feel free to mess around with these! You may notice on Etsy that many shops charge a whole lot more for sizes such as A1, 24x36” etc. In my experience I prefer charging a lower rate to attract more sales, but there is validity in going for a lower amount of sales with higher profits. As mentioned above, you can also offer different variations on items - for example different colour schemes on posters. This is always a decent idea (if it suits the design) as it provides the customer with more options, which might help to convert the sale. You can always add this in later however if you want to keep it simple while you start! Setting up shipping profiles Etsy makes it very easy to set up different shipping rates for different countries. However, luckily with PrintShrimp you can offer free shipping to the majority of the major countries that are active on Etsy!  Using PrintShrimp means that your production costs are low enough in each domestic market to justify this. If you look on Etsy you can see there are many shops that post internationally to countries such as the US or Australia. Therefore, they often charge £8-10 in postage, and have a delivery time of 1-2 weeks. This really limits their customer base to their domestic market.  Using PrintShrimp avoids this and means you can offer free shipping (as we absorb the shipping cost in our prices) to the major markets of the UK, Australia, and USA (Europe coming soon!).  We also offer a 1 day processing time, unlike many POD poster suppliers. This means you can set your Etsy processing time to just one day, which combined with our quick shipping, means you will be one of the quickest on Etsy at sending out orders. This is obviously very attractive for customers, who are often very impatient with wanting their orders!  Getting the sales and extra tips \-Don’t list an insane amount of listings when you first get started. Etsy will be like ‘hang on a second’ if a brand new shop suddenly has 200 items in the first week. Warm up your account, and take things slow as you get going. We recommend 5 a day for the first week or so, and then you can start uploading more. You don’t want Etsy to flag your account for suspicious bot-like activity when you first get going.  \-It is very easy to copy listings when creating a new one. Simply select an old listing and press copy, and then you can just change the listing specific details to create a new one, rather than having to start from scratch. It can feel like a bit of a ball-ache setting up your first ever listing, but from then on you can just copy it over and just change the specifics.  \-Try and organize your listings into sections! This really helps the customer journey. Sometimes a customer will click onto your shop after seeing one of your listings, so it really helps if they can easily navigate your shop for what they are looking for. So, you now have a fully fledged Etsy shop. Well done! Time to start making £3,000 a month straight away right? Not quite. Please bear in mind, patience is key when starting out. If you started doing this because you are £10,000 in debt to the Albanian mafia and need to pay it off next week, you have come into this in the wrong frame of mind. If you have however started this to slowly build up a side hustle which hopefully one day become your full time gig, then winner winner chicken dinner.  Starting out on Etsy isn’t always easy. It takes time for your shop to build up trust! As I’ve said before, a buyer is far more likely to purchase from a shop with 1000s of reviews, than a brand new one with 0. But before you know it, you can become one of these shops! One thing you can do at the very start is to encourage your friends and family to buy your posters! This is a slightly naughty way of getting a few sales at the start, of course followed by a few glowing 5\* reviews. It really helps to give your shop this little boost at the start, so if this is something you can do then I recommend it.  Okay, so once you have a fully fledged shop with a decent amount of listings, you might be expecting the sales to start rolling in. And, if you are lucky, they indeed might. However, in my experience, you need to give your listings a little boost. So let us introduce you to: The wonderful world of Etsy ads Ads!! Oh no, that means money!! We imagine some of you more risk averse people are saying to yourself right now. And yes, it indeed does. But more often than not unfortunately you do have to spend money to make money.  Fortunately, in my experience anyway, Etsy ads do tend to work. This does however only apply if your products are actually good however, so if you’re back here after paying for ads for 2 months and are losing money at the same rate as your motivation, maybe go back to the start of this guide and pick another niche.  When you first start out, there are two main strategies.  Number 1: The Safer Option So, with PrintShrimp, you will essentially be making a minimum of £6 profit per order. With this in mind, I normally start a new shop with a safer strategy of advertising my products with a budget of $3-5 dollars a day. This then means that at the start, you only need to make 1 sale to break even, and anything above that is pure profit! This might not seem like the most dazzling proposition right now, but again please bear in mind that growth will be slow at the start. This means that you can gradually grow your shop, and therefore the trust that customers have in your shop, over time with a very small risk of ever actually losing money. Number 2: The Billy Big Balls Option If you were yawning while reading the first option, then this strategy may be for you. This will be better suited to those of you that are a bit more risk prone, and it also helps if you have a bit more cash to invest at the start. Through this strategy, you can essentially pay your way to the top of Etsy's rankings. For this, you’ll probably be looking at spending $20 a day on ads. So, this can really add up quickly and is definitely the riskier option. In my experience, the level of sales with this may not always match up to your spend every day. You may find that some days you rake in about 10 sales, and other days only one. But what this does mean is that as your listings get seen and purchased more, they will begin to rank higher in Etsy’s organic search rankings, at a much quicker rate than option one. This is the beauty of Etsy’s ads. You can pay to boost your products, but then results from this paid promotion feed into the organic ranking of your products. So you may find that you can splash the cash for a while at the start in order to race to the top, and then drop your ad spending later on when your products are already ranking well.  Sending your poster orders So, you’ve now done the hard bit. You have a running Etsy store, and essentially all you need to now on a daily basis is send out your orders and reply to customer messages! This is where it really becomes passive income.  \-Check out the PrintShrimp order portal. Simply sign up, and you can place individual orders through there. \-Bulk upload: We have an option to bulk upload your Esty orders via csv.  Seriously, when you are up and running with your first store, it is really as easy as that.  Once you have your first Etsy store up and running, you can think about expanding. There are many ways to expand your income. You can set up other Etsy stores, as long as the type of posters you are selling varies. You can look into setting up your own Shopify stores, and advertise them through Facebook, Instagram etc. Through this guide, we will teach you everything you need to know about starting to sell posters and generate some income. We will also show you why PrintShrimp is the best POD supplier for all of your poster needs. Trust me, you won’t need much convincing.

machine-learning-blackjack-solution
github
LLM Vibe Score0.42
Human Vibe Score0.022610872675250356
GregSommervilleMar 27, 2025

machine-learning-blackjack-solution

machine-learning-blackjack-solution Introduction A genetic algorithm is a type of artificial intelligence programming that uses ideas from evolution to solve complex problems. It works by creating a population of (initially random) candidate solutions, then repeatedly selecting pairs of candidates and combining their solutions using a process similar to genetic crossover. Sometimes candidate solutions even go through mutation, just to introduce new possibilities into the population. After a large number of generations, the best solution found up to that point is often the optimal, best solution possible. Genetic algorithms are particularly well-suited for combinatorial problems, where there are huge numbers of potential solutions to a problem. The evolutionary process they go through is, in essence, a search through a huge solution space. A solution space so large that you simply could never use a brute force approach. This project is a demonstration of using a genetic algorithm to find an optimal strategy for playing the casino game Blackjack. Please see this article for a story about how this program was used, and what the results were. The article describes some of the available settings, and shows how different values for those settings affect the final result. The source code is for a Windows application written in Cthat allows you to play with different settings like population size, selection style and mutation rate. Each generation's best solution is displayed, so you can watch the program literally evolve a solution. !blackjack strategy tester screenshot The property grid located at the upper left of the screen is where you adjust settings. There's an informational area below that, and the right side of the screen is the display area for the three tables that represent a strategy for playing Blackjack. The tall table on the left is for hard hands, the table in the upper right is for soft hands, and the table in the lower right is for pairs. We'll talk more about how to interpret this strategy in a bit. The columns along the tops of the three tables are for the dealer upcard. When you play Blackjack the dealer has one of his two cards initially turned face up, and the rank of that card has a big impact on recommended strategy. Notice that the upcard ranks don't include Jack, Queen or King. That's because those cards all count 10, so we group them and the Ten together and simplify the tables. To use the tables, first, determine if you have a pair, soft hand, or hard hand. Then look in the appropriate table, with the correct dealer upcard column. The cell in the table will be "H" when the correct strategy is to hit, "S" when the correct strategy is to stand, "D" for double-down, and (in the pairs table only) "P" for split. A Word About This "Optimal" Strategy Before we go any further, it needs to be stated that this problem of finding an optimal Blackjack strategy has already been solved. Back in the 1960s, a mathematician named Edward O. Thorp authored a book called Beat the Dealer, which included charts showing the optimal "Basic" strategy. That strategy looks like this: !optimal blackjack strategy So we're solving a problem that has already been solved, but that's actually good. That means we can compare our results to the known best solution. For example, if our result strategy tells us to do anything but stand when holding a pair of Tens, Jacks, Queens or Kings, we know there's a problem. There's one other thing to get out of the way before we go any further, and that's the idea of nondeterministic code. That means that if we run the same code twice in a row, we're likely to get two different results. That's something that happens with genetic algorithms due to their inherent randomness. There's no guarantee you'll find the absolute optimal solution, but it is assured that you will find an optimal or near-optimal solution. It's something that isn't typical when writing code, so it takes some adjustment for most programmers. Genetic Algorithms Now let's talk about the details of a genetic algorithm. Fitness Scores First of all, we need a way to evaluate candidates so we can compare them to each other. That means a numeric fitness score, which in this case is quite simple: you simulate playing a certain number of hands using the strategy, and then count the number of chips you have at the end. The big question is, how many hands should we test with? The challenge of trying to test a strategy is that due to the innate randomness of Blackjack, you could use the same strategy ten times and get ten completely different results. Obviously, the more hands you play, the more the randomness gets smoothed out, and the quality of the underlying strategy starts to emerge. If you doubt this, just think about flipping a coin. If you only flip it five times, there's certainly a possibility that it'll come up heads all five times (in fact, that happens just over 3% of the time). However, if you flip it 500 times, there's no way it's going to end up all heads - the odds of it happening are 0.5500, which works out to be roughly once every 3 x 10150 times you try it. After some testing and analysis, it was determined that a minimum of 100,000 hands per test is needed for a reasonable level of accuracy. There's still variance even at that number, but in order to cut the variance in half, you'd need to bump the number of hands to 500,000. One reason this accuracy is important is that in the later generations, the differences between candidates are very small. Evolution has caused the main parts of the strategy to converge on a particular approach, and towards the end all it's doing is refining the minor details. In those cases it's important to accurately determine the difference between two similar candidates. Representation Representation is simply the idea that we need to use a data structure for a candidate solution that can be combined via crossover, and possibly mutated. In this case, that's also quite simple because the way that human beings represent a Blackjack strategy is to use three tables, as we've seen. Representing those in code with three two-dimensional arrays is the obvious approach. Each cell in those three tables will have "Hit", "Stand", "Double-Down", or (only for pairs) "Split". By the way, since there are 160 cells in the hard hands table, and 80 cells in the soft hands table, and 100 cells in the pairs table, we can calculate exactly how many possible distinct strategies there are for Blackjack: 4100 x 380 x 3160 = 5 x 10174 possible Blackjack strategies That's a big number, which is obviously impossible to search using brute force. Genetic algorithms (GAs) are extremely helpful when trying to find an optimal solution from a very large set of possible solutions like this. Blackjack Rules and Strategies The rules of Blackjack are fairly simple. The dealer and the player both are dealt two cards. The player sees both of their cards (they are usually dealt face up), and one of the dealer's cards is dealt face up. Each card has a value - for cards between 2 and 10, the value is the same as the card's rank (so an Eight of Spades counts as 8, for example). All face cards count as 10, and an Ace can either be 1 or 11 (it counts as 11 only when that does not result in a hand that exceeds 21). The suit of a card does not matter. After the cards are dealt, if the player has Blackjack (a total of 21) and the dealer does not, the player is immediately paid 1.5 times their original bet, and a new hand is dealt. If the player has 21 and the dealer does also, then it's a tie and the player gets their original bet back, and a new hand is dealt. If the player wasn't dealt a Blackjack, then play continues with the player deciding whether to Stand (not get any more cards), Hit (receive an additional card), Double-down (place an additional bet, and receive one and only one more card), or, in the case of holding a pair, splitting the hand, which means placing an additional bet and receiving two new cards, so the end result is that the player is now playing two (or, in the case of multiple splits, more than two) hands simultaneously. If the player hits or double-downs and has a resulting hand that exceeds 21, then they lose and play continues with the next hand. If not, then the dealer draws until their hand totals at least 17. If the dealer exceeds 21 at this point, the player receives a payment equal to twice their original bet. If the dealer doesn't exceed 21, then the hands are compared and the player with the highest total that doesn't exceed 21 wins. Because of these rules, certain effective strategies emerge. One common strategy is that if you hold a hard hand with a value of 20, 19 or 18, you should Stand, since you avoid busting by going over 21, and you have a nice hand total that might win in a showdown with the dealer. Another common strategy is to split a pair of Aces, since Aces are so powerful (due to the fact that count as 11 or 1, you can often Hit a hand with a soft Ace with no risk of busting). Likewise, splitting a pair of 8s is a good idea because with a hard total of 16, it's likely you will bust if you take a Hit (since so many cards count as 10). As a human being, all it takes is a little knowledge about the rules in order to construct a strategy. The GA program doesn't have that advantage, and operates completely without any pre-programmed knowledge of Blackjack. It simply uses the relative fitness scores and the mechanism of evolution to find the solution. GA Settings There are many variables or settings for a GA. You can adjust population size, how parent candidates are selected, how the resulting children may be mutated, and several other items. The following sections describe some of these settings: Setting: Selection Style Once we've solved representation and have a fitness function, the next step is to select two candidates for crossover during the process of building a new generation. There are three common styles for selection, and this program supports all of them. First, you can choose Roulette Wheel selection. It's named for a Roulette wheel because you can imagine each candidate's fitness score being a wedge in a pie chart, with a size proportionate to its relative fitness compared to the other candidates. (Of course, this assumes that all fitness scores are positive, which we will talk about shortly). The main benefit of Roulette Wheel selection is that selection is fitness-proportionate. Imagine if you had only three candidates, with fitness scores of 1, 3, and 8. The relative selection probabilities for those candidates will be 1/12, 3/12, and 8/12. The downside of Roulette Wheel selection is that it tends to be somewhat slow in terms of processing. The selection process is done by iterating through the candidates until a particular condition is matched - in other words, O(N) performance. Another potential problem with Roulette Wheel selection is that there may be situations where fitness scores vary widely, to such an extent that only certain candidates have any reasonable chance of being selected. This happens frequently in early generations, since the majority of candidates are mostly random. Although this might sound like a positive (since you ultimately want to select candidates with high fitness scores), it also results in a loss of genetic diversity. In other words, even though a particular candidate may have a low fitness score in an early generation, it may contain elements that are needed to find the ultimate solution in later generations. Ranked Selection is the solution to this problem. Instead of using raw fitness scores during the selection process, the candidates are sorted by fitness, with the worst candidate receiving a score of 0, the second worse receiving 1, and so forth, all the way to the best candidate, which has a score equal to the population size - 1. Ranked Selection is quite slow, since it combines the O(N) performance of Roulette Wheel, with the additional requirement that the candidates be sorted before selection. However, there may be circumstances where it performs better than other selection approaches. Finally, the fastest selection method of all is called Tournament Selection. This method simply selects N random candidates from the current generation, and then uses the one with the best fitness score. A tournament size of 2 means two random candidates are selected, and the best of those two is used. If you have a large tournament size (like 10), then 10 different candidates will be selected, with the best of those being the ultimate selection. That obviously tilts the balance between randomness and quality. Tournament selection works well in most cases, but it does require some experimentation to find the best tourney size. Setting: Elitism Elitism is a technique that helps ensure that the best candidates are always maintained. Since all selection methods are random to some degree, it is possible to completely lose the best candidates from one generation to another. By using Elitism, we automatically advance a certain percentage of the best candidates to the next generation. Elitism does have a negative impact on performance since all of the candidates must be sorted by fitness score. Typically Elitism is done before filling the rest of a new generation with new candidates created by crossover. Crossover Details Once two candidate solutions have been selected, the next step in building a new generation is to combine those two into a single new candidate, hopefully using the best of both parent strategies. There are a number of ways to do crossover, but the method used in this program is quite straightforward - the two fitness scores are compared, and crossover happens in a relatively proportionate way. If one candidate has a fitness of 10, and the other has a fitness of 5, then the one with fitness 10 contributes twice as much to the child as the parent with a fitness of 5. Since the fitness scores in this program are based on how much the strategy would win over thousands of hands, almost all fitness scores will be negative. (This is obviously because the rules are set up so the house always wins.) This makes it difficult to calculate relative fitnesses (how do you compare a positive number with a negative, and find relative proportions?), and also causes problems with selection methods like Roulette Wheel or Ranked. To solve this, we find the lowest fitness score of the generation and add that value to each candidate. This results in an adjusted fitness score of 0 for the very worse candidate, so it never gets selected. Mutation As has been mentioned a few times, maintaining genetic diversity in our population of candidate solutions is a good thing. It helps the GA ultimately find the very best solution, by occasionally altering a candidate in a positive direction. There are two settings for mutation. MutationRate controls what percentage of new candidates have mutation done on them. MutationImpact controls what percentage of their strategy is randomized. Population Size Population size has a significant impact on performance. The smaller the population size, the faster the GA will execute. On the other hand, if the size is too low the population may not have enough genetic diversity to find the ultimate solution. During testing, it looks like 700 to 1000 is a good balance between speed and correctness. Performance Notes This program consumes a lot of processing power. Running tests of hundreds of thousands of hands of Blackjack for hundreds or thousands of candidates consumes a lot of time. It's really imperative to write the code so that it works as efficiently as possible. If your CPU isn't consistently at or above 95% usage, there's still room for improvement. Multi-threading is a natural fit for genetic algorithms because we often want to perform the same action on each candidate. The best example of this is when we calculate fitness scores. This is often an operation that takes quite a bit of time. In our case, we're dealing out 100,000 hands, and each hand has to be played until the end. If we're single-threading that code, it's going to take a long time. Multi-threading is really the way to go. Luckily, there's a ridiculously simple way to efficiently use all of your processors for an operation like this. This code loops over all of the candidates in the currentGeneration list, calls the fitness function and sets the fitness property for each: Regardless of the number of items in the list or the number of processors on your machine, the code will efficiently run the code in a multi-threaded manner, and continue only when all of the threads are complete. One of the side effects of making this code multi-threaded is that all of the code relating to evaluating a candidate must be thread-safe, including any Singleton objects. When making code thread-safe, pay attention that you don't accidentally introduce code that will slow your program down unintentionally, because sometimes it can be quite subtle. Random numbers are central to how genetic algorithms work, so it's critical that they can be used correctly from a multithreaded environment. That means that each random number generator must be separate from the others, and it also means that each must produce a distinct series of random numbers. Random number generators use seed values which are usually time-based, like the number of milliseconds the computer has been turned on. Starting with that seed, subsequent calls will return a series of numbers that look random, but really aren't. If you start with the same seed, you get the same sequence. And that's a problem because if you create multiple random number generator objects in a loop using the default time-based seed, several of them will have the same time-based initial seed value, which will result in the same sequence of "random" numbers. That's a bug, because it can reduce the true randomness of the program a great deal, and that's vital to a genetic algorithm. There are a couple of ways to solve this problem. First, you can make the random object truly a singleton, and restrict access to it by using a Clock statement. The makes all access serialized for any random number need, which reduces performance. Another approach is to make the variable static per thread. By declaring the variable as static and also marking it with the [ThreadStatic] attribute, the .NET runtime allocates one static variable per thread. That eliminates the locking/serialization, but also has performance issues. The approach used in this application is to use a non-default seed value. In this case we call Guid.NewGuid().GetHashCode(), which generates a new, unique GUID, then gets an integer hashcode value that should be unique, depending on how GetHashCode is implemented. While multithreading really helps performance, there are also other things we can do to improve performance. For example, when dealing with large populations, the hundreds or thousands of objects that will be generated each generation can quickly turn into a huge problem related to garbage collection. In the end, the easiest way to solve that is to look through the code and find objects being allocate inside a loop. It's better to declare the variable outside of the loop, and then clear it in the loop, rather than reallocate it. In a program like this one where you could be looping hundreds of thousands of times, this can result in a very significant performance boost. For example, in an early version of this code, a Deck object was created for each hand. Since there are hundreds of candidate solutions running hundreds of thousands of trial hands, this was a huge inefficiency. The code was changed to allocate one deck per test sequence. The deck was shuffled as needed, so it never needs to be reallocated. Beyond the cards in the deck, another object type that was repeatedly created and destroyed were the candidate strategies. To mitigate this problem, a StrategyPool class was created that handles allocation and deallocation. This means that strategy objects are reused, rather than dynamically created when needed. The pool class has to be thread-safe, so it does serialize access to its methods via a Clock statement, but overall using the pool approach produced a good performance increase. Finally, a subtle form of object allocation is conversion. In an early version of the code, a utility card function used Convert.ToInt32(rankEnum). Obviously, the easiest way to convert from an enum to an int is simply to cast it, like (int)rankEnum. But it's hard to know exactly what the difference is between that approach, int.Parse(), int.TryParse(), or Convert.ToInt32(), since they can all be used and are roughly equivalent. Perhaps the compiler was boxing the enum value before passing it to Convert.ToInt32(), because the profiler identified this as a function that had large amounts of thread contention waiting - and the problem got much, much worse as the generations passed. By rewriting the conversion to use a simple cast, the program performance increased threefold (3x). Contributing Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us. Author Greg Sommerville - Initial work* License This project is licensed under the Apache 2.0 License - see the LICENSE.md file for details

CollabAI
github
LLM Vibe Score0.449
Human Vibe Score0.07795191529604462
sjinnovationMar 27, 2025

CollabAI

CollabAI About Welcome to Collabai.software, where we've taken the world of AI to new heights. We've been working tirelessly to bring you the most advanced, user-friendly platform that seamlessly integrates with the powerful OpenAI API, Gemini, and Claude. Imagine running your own ChatGPT on your server, with the ability to manage access for your entire team. Picture creating custom AI assistants that cater to your unique needs, and organizing your employees into groups for streamlined collaboration. With Collabai.software, this is not just a dream, but a reality. Collabai.software Features: Self-Hosting on Your Cloud: Gain full control by hosting the platform on your private cloud. Ensure data privacy by using your API codes, allowing for secure data handling. Enhanced Team Management: Manage teams with private accounts and customizable access levels (Departments). Prompt Templates: Utilize generic templates to streamline team usage. Departmental Access & Assistant Assignment: Assign AI assistants to specific departments for shared team access. Customizable AI Assistants: Create personalized AI assistants for users or organizations. Tagging Feature in Chats: Organize and retrieve chat data efficiently with custom tags. Chat Storage and Retrieval: Save all chats and replies for future analysis, with an option to restore accidentally deleted chats from Trash. Optimized Performance: Experience our high-speed, efficient platform. Our clients have been using it for over a year, with some spending $1500-$2000 per month on the API. File Upload & GPT-4 Vision Integration: Enhance interactions by uploading files for analysis and sending pictures for AI description. OpenAI API, Gemini, and Claude Integration: Seamlessly integrate with the powerful OpenAI API, Gemini, and Claude for a comprehensive suite of AI capabilities. API-Based Function Calls: Execute custom functions and automate tasks directly through the API. Usage Monitoring: Track your daily and monthly API usage costs to optimize spending. Day and Night Mode: Switch between light and dark themes to enhance visual comfort. Additional Features: Private Accounts: Ensure the security and privacy of your team members' data. Customizable Access Levels: Tailor access permissions to meet the specific needs of your organization. Shared Team Access: Foster collaboration by assigning AI assistants to specific departments or teams. AI-Powered File Analysis: Gain insights and automate tasks by uploading files for AI analysis. AI-Generated Image Descriptions: Enhance communication and understanding by sending pictures for AI-powered descriptions. !image !image !image Folder Structure Client The client folder contains the React-based frontend code for the application. This includes JSX, CSS, and JavaScript files, as well as any additional assets such as images or fonts. Below is a brief overview of the main subdirectories within the client folder: src: This directory contains the React components, styles, and scripts for the frontend application. public: Static assets, such as images or favicon.ico, go here. This folder is served as-is and not processed by the build system. Server The server folder contains all the backend-related code for the application, following a Model-View-Controller (MVC) pattern. Here is a breakdown of the main subdirectories within the server folder: controllers: This directory holds the controller files responsible for handling requests, processing data, and interacting with models. models: Data models and database-related code are organized in this folder. config: Configuration files for the backend, such as database configuration or any other service configuration should be stored here, can be stored in this directory. Getting Started Follow the steps below to get the project up and running. Prerequisites Node.js (Version: >=20.x) MongoDB NPM Development Setup Clone the Repository bash cd client Install Dependencies bash cd ../server Install Backend Dependencies bash npm start To initialize the application data and create a superadmin user, you can use either cURL or Postman: Using cURL If you prefer command-line tools, you can use curl to make a POST request to the /init-setup endpoint. Open your terminal and run the following command: curl -X POST http://localhost:8011/api/init -H "Content-Type: application/json" -d '{ "fname": "Super", "lname": "Admin", "email": "superadmin@example.com", "password": "yourSecurePassword", "employeeCount": 100, "companyName": "INIT_COMPANY" }' Initializing Setup with Postman Open Postman: Launch the Postman application. Create a New Request: Click on the '+' or 'New' button to create a new request. Set HTTP Method to POST: Ensure that the HTTP method is set to POST. Enter URL: Enter the URL http://localhost:8011/api/init. Set Headers: Go to the 'Headers' tab. Set Content-Type to application/json. Set Request Body: Switch to the 'Body' tab. Select the 'raw' radio button. Enter the JSON data for your superadmin user: Send Request: Click the 'Send' button to make the request. This will send a POST request to http://localhost:8011/api/init with the provided JSON payload, creating a superadmin user with the specified details. Site Setup: Login with the superadmin credentials and set up your site by adding configs from your settings page, for ex. API keys, etc. Reference CollaborativeAI Reference Guide Contributing If you would like to contribute to the project, we welcome your contributions! Please follow the guidelines outlined in the CONTRIBUTING.md file. Feel free to raise issues, suggest new features, or send pull requests to help improve the project. Your involvement is greatly appreciated! Thank you for contributing to our project! License MIT