Open warklp opened 5 years ago
It’s because Supercell updated the layout of the spectator mode. The AI isn’t looking at the right spots for the card locations. It needs to be updated to look at the right areas.
I fixed the layout, but i am having problem with the last card of the deck, maybe you can help me
It looks like you have the testCNN.png open, close the image and try again. (Permission denied to write since the file is open).
i'll see that, and another thing, sometimes i get this error and the script closes
Interesting, do you have any other cases of this happening?
When i start and my opponent already played 1 card and then he play that card again this always happens
I want to say it has to do with the formatting still. Can you run the program and then close out of it during the game. Afterwards, go to your "testData" folder. This folder is where temporary crops of each of the 8 cards are saved. Maybe they aren't getting cropped right, check to see if the cropped images are indeed the cards.
Another error just happend, everything was fine, game was already on overtime..
It looks like it's an error in the save function for the PIL library, give me a moment
Seems like its cropped just fine, but stop working for no reason
I see the problem here, try placing a r in front of the file path for any open/save function calls, and maybe use the absolute address. Check this out: https://stackoverflow.com/questions/39737448/random-errors-when-using-pil-on-windows "[Errno 22] invalid argument" usually relates to issues regarding file paths
all the cards cropped just fine and i get that error, saying that a card isnt in the list
As for this error, the opponent's hand isn't getting populated properly. Mind checking how the testData2 folder looks? It should be the areas slightly above the 8 cards.
it is above the 8 cards, but the layout now its different, maybe a little bit confuse for the script
I see the problem now. The old spectator background/layout was just brown, and it didn't show the elixir count. But now the layout has changed, it shows the current elixir in the brown background area. This makes the neural network think that cards are being placed when they really aren't, because it sees pink which was the old way of determining when a card was played. I would need to retrain this neutral network for it to have correct predictions. This would require a new set of training data, and it may require much more data to train, or perhaps a stronger training method (since the predictions are now harder: pink background with pink pop-ups).
True, that's probably why, thank you, i'll try to do something about it.
Let me know if you think of anything! I see 2 options as of now, 1) retrain the 2nd neural network with new training data, or 2) find a new way to determine played cards.
Well, ive noticed that when the opponent play a card the card go 1 or 2 cm up for a second or less, maybe thats a opening for another way to determine cards played.
That’s true, but that means your computer will have to be able to perform predictions a second each. I believe I choose the pink icon because it lasted longer. It’s worth a try though!
Amar Saini
M.S. - Electrical Engineering & Computer Science School of Engineering, University of California, Merced B.S. - Computer Science & Engineering School of Engineering, University of California, Merced
From: warklp notifications@github.com Sent: Wednesday, March 27, 2019 10:00:04 PM To: AmarSaini/Clash-Royale-AI-Card-Tracker Cc: Amar Saini; Comment Subject: Re: [AmarSaini/Clash-Royale-AI-Card-Tracker] Elixir bar on every game mode (#2)
Well, ive noticed that when the opponent play a card the card go 1 or 2 cm up for a second or less, maybe thats a opening for another way to determine cards played.
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/AmarSaini/Clash-Royale-AI-Card-Tracker/issues/2#issuecomment-477448689, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AYLePSNpFWcrfBahXAbXfB-dkLRmlg53ks5vbExUgaJpZM4cOs9x.
Another thing ive noticed, most of the times que program dont recognize the "golden cards" just like the last image i shared, do you have any idea of how to make the program recognize the 2 types of cards? golden and not-golden?
Network would also need to be retained for that. Or maybe crop inside the card image (get rid of the gold border) that may work
Amar Saini
M.S. - Electrical Engineering & Computer Science School of Engineering, University of California, Merced
B.S. - Computer Science & Engineering School of Engineering, University of California, Merced
From: warklp notifications@github.com Sent: Thursday, March 28, 2019 9:48:17 AM To: AmarSaini/Clash-Royale-AI-Card-Tracker Cc: Amar Saini; Comment Subject: Re: [AmarSaini/Clash-Royale-AI-Card-Tracker] Elixir bar on every game mode (#2)
Another thing ive noticed, most of the times que program dont recognize the "golden cards" just like the last image i shared, do you have any idea of how to make the program recognize the 2 types of cards? golden and not-golden?
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/AmarSaini/Clash-Royale-AI-Card-Tracker/issues/2#issuecomment-477679160, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AYLePaQC_xFHElw5MkdMDVwVqMvOQmtHks5vbPJQgaJpZM4cOs9x.
Hello again, I'am still trying to fix the invalid argument issue, i don't know where to put the r, can you tell me in which lines?
Hey,
Line 661 should be one. Anywhere you are accessing images for reading/writing. CTRL-F "imsave" for a few.
Amar Saini
M.S. - Electrical Engineering & Computer Science School of Engineering, University of California, Merced
B.S. - Computer Science & Engineering School of Engineering, University of California, Merced
From: warklp notifications@github.com Sent: Tuesday, April 2, 2019 7:31:02 PM To: AmarSaini/Clash-Royale-AI-Card-Tracker Cc: Amar Saini; Comment Subject: Re: [AmarSaini/Clash-Royale-AI-Card-Tracker] Elixir bar on every game mode (#2)
Hello again, I'am still trying to fix the invalid argument issue, i don't know where to put the r, can you tell me in which lines?
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/AmarSaini/Clash-Royale-AI-Card-Tracker/issues/2#issuecomment-479305699, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AYLePcv9UUhpeddmZErSXsYCy0uyp4Yaks5vdBJmgaJpZM4cOs9x.
Any chance for a fix by you, because of the most recent updates or was it just a personal project to deal with neural networks?
Hey, @ComputerApp1234. Yea I noticed the game has updated, such as new spectator layout (different location of cards), elixir bar now shows while spectating if I remember correctly, new cards/some cards have been redesigned. I haven't been working on it too much, but I may make a revamped version that uses a different framework, such as PyTorch or even fast.ai (definitely go check them out!). Also, I may make it so you don't need to be using 1920x1080 specifically (make the card locations depending on max width/height, rather than hard-coded values of a 1920x1080 screen). I'll make an announcement/update to read me soon!
Thank you very much for the fast reply. Like this it would be possible to use other emulators instead of BlueStacks? And an update by you would be great!
I'm not too sure about any other emulators, are you familiar with any?
I usually use MEmu to play Clash Royale.
Ah interesting! Have you tried bluestacks as well? Which do you prefer/is more popular?
I've tried both, but i prefer MEmu, because it feels more stable in my opinion. But this could also be because of my settings. The main reason is i'm more used to MEmu.
Interesting I'll check it out
All game mode now show the elixir bar, that means, isnt working anymore, telling wrong cards and not working couting elixir, you know how to fix it?