Programming Inquiry - Best way to store a win/loss/draw record

avatar

Hi All,

Hoping someone out there would know the answer to this!

Trying to store a .json file for my splinterlands bot and started to capture playable hands as follows. When trying to do a record like concept "record" : [0,0,0], is the current way I'm storing the value. Is this the best method or am I better suited to have wins, losses and ties all separate?

{
"mana": 34,
"splinter": "Fire",
"ruleset1": "Standard",
"ruleset2": "None",
"summoner": 167,
"position1": 157,
"position2": 158,
"position3": 0,
"position4": 0,
"position5": 0,
"position6": 0,
"record" : [0,0,0],
"winperc": 0,
"recordvsfire": [0,0,0],
"recordvswater": [0,0,0],
"recordvsearth": [0,0,0],
"recordvslife": [0,0,0],
"recordvsdeath": [0,0,0],
"recordvsdragon": [0,0,0]
},

Thanks,
Fitz



0
0
0.000
14 comments
avatar

Hmm I am not sure but I did reblog this for more exposure.

0
0
0.000
avatar

thanks @solominer!! Haha my newborn is preventing me from spending a lot of time on this. Can't wait to get this up and running. Will share once I'm at a point that its useable!!

0
0
0.000
avatar

No worries, looking forward to it. I will happily apply the changes to my fork when you do.

0
0
0.000
avatar

@solominer You mentioned getting your bots as is to silver, mine are just making it to silver as well! I put the bare minimum in to get the account power there and then I mainly play my main which I've maxed at Diamond II so far!

0
0
0.000
avatar

Ah congrats! Ive considered setting up my solominer account on a bot to see how well it does since I have enough cards to get all the way to champ. But just been playing it myself but maybe ill try.

0
0
0.000
avatar

yeah my top level is only diamond still 😅 ive started to load up my bots after hearing yours are all silver mine were bronze, not anymore 😂

0
0
0.000
avatar

Hah, yeah I got to diamond one season. But usually I get into gold now a days.

Solo00 can get up to Silver as it has the best cards, but my others tend to stay around bronze. I think its due to many battles failing to play, maybe when you get the logic worked out I can get all of them into silver.

0
0
0.000
avatar

Oh damn, yeah extended weekend so I'm hoping to work on it a little this weekend!! Still have a few design ideas i'm working out I don't want to go overboard with the logic out of the gate until I can learn to be a more efficient coder.

0
0
0.000
avatar

Congratulations @fitz1567! You have completed the following achievement on the Hive blockchain and have been rewarded with new badge(s) :

You got more than 10 replies.
Your next target is to reach 50 replies.

You can view your badges on your board and compare yourself to others in the Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

Check out the last post from @hivebuzz:

Time to go on your Hive Tour
0
0
0.000
avatar

Do you know about Neil's Monsters Mavericks show on the MSP discord? He talks about Splinterlands and such. It's on Tuesdays at 4pm EST.

Idk if your into those kind of shows but I find it interesting.

0
0
0.000
avatar

never heard of this, whats MSP stand for? Looks like I must have just missed this!

0
0
0.000
avatar
(Edited)

MSP is a group on Hive. They have a discord channel where DJs do shows. I listen to a bunch of them during the week. Neil's may interest you, next Tuesday I will be a guest on the show talking about how I track my profits during the seasons.

Here's a link to their discord.

https://discord.gg/HYj4yvw

Btw my bots have just about broken even.. maybe one or two more seasons and I've earned more than my spellbooks cost me :)

0
0
0.000
avatar

Just got my bot up and running 😁!!! Only issue with sharing is its a local mysql database I've built, so I can't share the database 😅.

It runs from a prebuilt list, it doesn't yet update my record per the match.

0
0
0.000
avatar

congrats! So you had to use a mysql database for the logic for the monsters and summoners to query for certain rulesets? I assume this was all done previously on herokuapp? Seems using that external website was the weakest part of this bot so glad you got it working with your local database.

You wont share it because you are worried about SQL injection attacks or something? Hope you can find a way to harden it so its protected from public use one day.

Well regardless.. good job!

0
0
0.000