Chat GPT & Generative AI tools

A dedicated space to explore and discuss how cutting-edge technologies are reshaping sports trading and betting strategies. Collaborate on innovative ideas, and stay ahead of the curve in a rapidly evolving landscape.
Post Reply
User avatar
napshnap
Posts: 1225
Joined: Thu Jan 12, 2017 6:21 am

ShaunWhite wrote:
Fri Oct 13, 2023 8:19 pm
Screenshot_20231013_201804_BBC Sounds.jpg

https://www.bbc.co.uk/sounds/play/m001r ... are-mobile
He is an interesting fellow, I remember I've read about his studio's game "Republic: The Revolution" (political strategy game), they promised that every npc on the map would have a job and do a daily routine, and I played it when it got released. But to be honest, I didn’t complete it)
User avatar
napshnap
Posts: 1225
Joined: Thu Jan 12, 2017 6:21 am

Tiesto13 wrote:
Fri Oct 13, 2023 9:55 pm
I've just had a real success story with ChatGPT today. I'm by no means a coder, but after doing a couple of very basic courses, decided to build a little python script to read JSONs containing ball by ball cricket data and analyse them for various things. The main issue with it was that I was struggling with the large amount of nested info within each JSON and the looping operations I was requiring to do (to loop by innings, over and ball) to read this information properly and therefore had very manually built out the code for T20's only. Just spent a day with ChatGPT today though and asking it to refine my code to reduce repetition and rely more on looping, and whilst it was a nightmare to begin with, once I got the hang of breaking it down into small enough chunks, it was really good at rewriting all my code such that it is now completely scalable up to 50 over matches and test matches. Also meant that I could see how these looping functions work in practice and get my head around them properly.
Be superduper cautious if you plan to use it for betting/trading. You should understand very clearly what every piece of the code does. And when you step in a field of asynchronicity... oh boy.
User avatar
ShaunWhite
Posts: 10374
Joined: Sat Sep 03, 2016 3:42 am

napshnap wrote:
Sat Oct 14, 2023 11:55 am
He is an interesting fellow,
When you hear about these people it makes you realise everyone you know is an underperforming chimpanzee :) The unusual thing about him is that as well as exceptional brains, he's socially confortable and has business acumen.
Tiesto13
Posts: 30
Joined: Tue Aug 08, 2023 2:39 pm

napshnap wrote:
Sat Oct 14, 2023 11:58 am
Tiesto13 wrote:
Fri Oct 13, 2023 9:55 pm
I've just had a real success story with ChatGPT today. I'm by no means a coder, but after doing a couple of very basic courses, decided to build a little python script to read JSONs containing ball by ball cricket data and analyse them for various things. The main issue with it was that I was struggling with the large amount of nested info within each JSON and the looping operations I was requiring to do (to loop by innings, over and ball) to read this information properly and therefore had very manually built out the code for T20's only. Just spent a day with ChatGPT today though and asking it to refine my code to reduce repetition and rely more on looping, and whilst it was a nightmare to begin with, once I got the hang of breaking it down into small enough chunks, it was really good at rewriting all my code such that it is now completely scalable up to 50 over matches and test matches. Also meant that I could see how these looping functions work in practice and get my head around them properly.
Be superduper cautious if you plan to use it for betting/trading. You should understand very clearly what every piece of the code does. And when you step in a field of asynchronicity... oh boy.
Oh yeah, I'm doing a lot of checks on the output as well to make sure that what is coming out is correct. Not sure I understand your comment on asynchronicity, maybe that suggests that I need to be even more careful :D
Tiesto13
Posts: 30
Joined: Tue Aug 08, 2023 2:39 pm

Image
ShaunWhite wrote:
Fri Oct 13, 2023 10:55 pm
Tiesto13 wrote:
Fri Oct 13, 2023 9:55 pm
I've just had a real success story with ChatGPT today. .
In the interview above he talks about the implications of creatives being able to generate code instead of it being the realm of techies. Yours sounds like a prime example.
Yeah, was an interesting interview that. And yeah, I think a lot of people haven't realised what chatGPT opens up to them in that regard. You need some basic understanding of coding to get anything useful out of chatGPT. But what I was able to do in a day would have taken me months to learn and/or debug through trial and error previously
User avatar
Kai
Posts: 7051
Joined: Tue Jan 20, 2015 12:21 pm

Tiesto13 wrote:
Sat Oct 14, 2023 2:09 pm
But what I was able to do in a day would have taken me months to learn and/or debug through trial and error previously
An excellent example of working smarter and not harder, well done
User avatar
napshnap
Posts: 1225
Joined: Thu Jan 12, 2017 6:21 am

Tiesto13 wrote:
Sat Oct 14, 2023 2:07 pm
napshnap wrote:
Sat Oct 14, 2023 11:58 am
Tiesto13 wrote:
Fri Oct 13, 2023 9:55 pm
I've just had a real success story with ChatGPT today. I'm by no means a coder, but after doing a couple of very basic courses, decided to build a little python script to read JSONs containing ball by ball cricket data and analyse them for various things. The main issue with it was that I was struggling with the large amount of nested info within each JSON and the looping operations I was requiring to do (to loop by innings, over and ball) to read this information properly and therefore had very manually built out the code for T20's only. Just spent a day with ChatGPT today though and asking it to refine my code to reduce repetition and rely more on looping, and whilst it was a nightmare to begin with, once I got the hang of breaking it down into small enough chunks, it was really good at rewriting all my code such that it is now completely scalable up to 50 over matches and test matches. Also meant that I could see how these looping functions work in practice and get my head around them properly.
Be superduper cautious if you plan to use it for betting/trading. You should understand very clearly what every piece of the code does. And when you step in a field of asynchronicity... oh boy.
Oh yeah, I'm doing a lot of checks on the output as well to make sure that what is coming out is correct. Not sure I understand your comment on asynchronicity, maybe that suggests that I need to be even more careful :D
If you gonna play it serious, with real money, you should know exactly what the code does and always expect the worst (like, "oh, no way bf will send back some crap in a response" - BOOM!! - some nonsense in the response or "no way it's possible that some market data feed will freeze but still allowing to place/replace/cancel bets in the same market" - ...)
User avatar
ShaunWhite
Posts: 10374
Joined: Sat Sep 03, 2016 3:42 am

napshnap wrote:
Sat Oct 14, 2023 3:53 pm
If you gonna play it serious, with real money, you should know exactly what the code does and always expect the worst (like, "oh, no way bf will send back some crap in a response" - BOOM!! - some nonsense in the response or "no way it's possible that some market data feed will freeze but still allowing to place/replace/cancel bets in the same market" - ...)
It makes you a designer rather than a coder. But it's garbage in garbage out and there's a reason software designers get paid more than coders.

But 100% if you don't understand what might go wrong you won't cater for it. Unless of course you ask it to identify potential weaknesses 🤔
User avatar
napshnap
Posts: 1225
Joined: Thu Jan 12, 2017 6:21 am

ShaunWhite wrote:
Sat Oct 14, 2023 4:30 pm
napshnap wrote:
Sat Oct 14, 2023 3:53 pm
If you gonna play it serious, with real money, you should know exactly what the code does and always expect the worst (like, "oh, no way bf will send back some crap in a response" - BOOM!! - some nonsense in the response or "no way it's possible that some market data feed will freeze but still allowing to place/replace/cancel bets in the same market" - ...)
It makes you a designer rather than a coder. But it's garbage in garbage out and there's a reason software designers get paid more than coders.

But 100% if you don't understand what might go wrong you won't cater for it. Unless of course you ask it to identify potential weaknesses 🤔
No way, Shaun, NO WAY it'll (Chat GPT or other ai stuff) predict that a market feed will be freezed (without any error, just freezed) but bet placing/replacing/canceling part still gonna be operational, then this sport event will officially start but the market's not gonna turn inplay (cause it freezed), and bf'll refuse to void bets that were matched AFTER the incident.
User avatar
ShaunWhite
Posts: 10374
Joined: Sat Sep 03, 2016 3:42 am

napshnap wrote:
Sat Oct 14, 2023 5:10 pm
No way, Shaun, NO WAY
Yes way. And I haven't even started to coach it yet or discuss each point in more detail... But you're right, you could just get bollocks unless you know what direction to steer it.
Screenshot_9.jpg
You do not have the required permissions to view the files attached to this post.
User avatar
firlandsfarm
Posts: 3314
Joined: Sat May 03, 2014 8:20 am

Can AI do simple arithmetic? I would expect it to but here are some calculations from a recent conversation with Google Bard ...

A = (1 / 2.00) / (1 / 2.00 + 1 / 4.00 + 1 / 8.00) = 0.03571428571428571
B = (1 / 4.00) / (1 / 2.00 + 1 / 4.00 + 1 / 8.00) = 0.017857142857142856
C = (1 / 8.00) / (1 / 2.00 + 1 / 4.00 + 1 / 8.00) = 0.008928571428571428

To save you getting your calculators out the correct answers are ...
A = 0.5714285
B = 0.2857142
C = 0.1428571

ChatGPT made similar arithmetic mistakes and also came out with the following words of wisdom in respect of Dutching bets ...

"So, to Dutch bet the three selections with a total stake of $100, you should place the following bets:

$700.00 on Selection A
$350.00 on Selection B
$175.00 on Selection C"

Really!

And Microsoft AI put itself into a never-ending loop! When I told it it's first attempt was wrong it revised it's answer and when I told it the revised answer was wrong it went back to the first answer and carried on looping!

I appreciate they are 'learning' but basic arithmetic!
User avatar
Big Bad Barney
Posts: 329
Joined: Mon Feb 04, 2019 6:00 am

I find ChatGPT is pretty good with SQL.

Can save a lot of manual typing to fix certain things up.
Also pretty good at tidying up messy c# code...

One has to know what they're doing though...its not a substitute for that.

At my day job writing this stuff for the corporate, I long for the day I can let it read the full source code and ask it to clean this messy pile of !@# up. I really don't think it'd be too far off doing that if they were intent on going that way....surely someone is...

Billions and billions of $ in messy messy messy code out there...
User avatar
Trader724
Posts: 576
Joined: Fri Dec 27, 2019 11:22 pm

Happy b-day ChatGPT! 🎂 🥂
User avatar
Rich1950
Posts: 56
Joined: Thu Jan 19, 2023 7:34 pm

Hi there,

Had an interesting Chat.

Split Arsenal v Levercusen to Arsenal Levercusen


If you want to split the text "Arsenal v Leverkusen" into two separate columns, one for "Arsenal" and another for "Levercusen," you can follow the Text to Columns steps in Excel:

1. Select the column containing "Arsenal v Levercusen."
2. Go to the "Data" tab in the Excel ribbon.
3. Click on "Text to Columns."
4. Choose "Delimited" and click "Next."
5. Choose "Other" and enter "v" as the delimiter. Click "Next."
6. Specify the destination for the split data (columns) and click "Finish."

Now, "Arsenal" should be in one column, and "Levercusen" in the adjacent column.

But there is a v in Levercusen

If the text "Arsenal v Levercusen" has a "v" within "Levercusen," and you want to split it into two columns at the first occurrence of "v," you can use a formula in Excel. Assuming your data is in cell A1, you can use the following formulas:

For the "Arsenal" part (in cell B1):
```excel
=LEFT(A1, SEARCH(" v", A1) - 1)
```

For the "Levercusen" part (in cell C1):
```excel
=MID(A1, SEARCH(" v", A1) + 2, LEN(A1))
```

These formulas assume that there is a space before the "v." If the space is not present, adjust the formulas accordingly.

Can it be done with a macro

Certainly, you can use a simple VBA (Visual Basic for Applications) macro to achieve this. Here's an example macro that splits the text in the active cell based on the first occurrence of "v" and places the parts in the adjacent cells:

```vba
Sub SplitText()
Dim originalText As String
Dim parts() As String

' Get the text from the active cell
originalText = ActiveCell.Value

' Check if "v" exists in the text
If InStr(originalText, "v") > 0 Then
' Split the text into an array using "v" as the delimiter
parts = Split(originalText, "v", -1, vbTextCompare)

' Place the parts in adjacent cells
ActiveCell.Value = Trim(parts(0)) ' Left part
ActiveCell.Offset(0, 1).Value = Trim(parts(1)) ' Right part
Else
MsgBox "The text does not contain 'v'.", vbExclamation
End If
End Sub
```

To use this macro:

1. Press `ALT` + `F11` to open the Visual Basic for Applications editor.
2. Insert a new module (`Insert` > `Module`).
3. Copy and paste the above code into the module.
4. Close the VBA editor.

Now, you can select a cell containing "Arsenal v Levercusen" and run this macro. It will split the text into two columns in the same row.

This macro only splits the first team and the v into the second column

I apologize for the oversight. If you want to split the text at the first occurrence of "v" and place both parts in separate columns, you can use the following revised VBA macro:

```vba
Sub SplitText()
Dim originalText As String
Dim parts() As String

' Get the text from the active cell
originalText = ActiveCell.Value

' Check if "v" exists in the text
If InStr(originalText, "v") > 0 Then
' Split the text into an array using "v" as the delimiter
parts = Split(originalText, "v", -1, vbTextCompare)

' Place the parts in adjacent cells
ActiveCell.Value = Trim(parts(0)) ' Left part
ActiveCell.Offset(0, 1).Value = Trim("v" & parts(1)) ' Right part including "v"
Else
MsgBox "The text does not contain 'v'.", vbExclamation
End If
End Sub
```

This will place "Arsenal" in the active cell and "v Levercusen" in the adjacent cell.

That will not work if there is a v in the teams name

You're right, and I appreciate your clarification. If there could be a "v" within the team names, we need to modify the approach. Let's adjust the macro to split the text based on the first space, assuming that the team names don't contain spaces:

```vba
Sub SplitText()
Dim originalText As String
Dim firstPart As String
Dim secondPart As String

' Get the text from the active cell
originalText = ActiveCell.Value

' Check if a space exists in the text
If InStr(originalText, " ") > 0 Then
' Split the text into two parts using the first space as the delimiter
firstPart = Trim(Left(originalText, InStr(originalText, " ") - 1))
secondPart = Trim(Mid(originalText, InStr(originalText, " ") + 1, Len(originalText)))

' Place the parts in adjacent cells
ActiveCell.Value = firstPart
ActiveCell.Offset(0, 1).Value = secondPart
Else
MsgBox "The text does not contain a space.", vbExclamation
End If
End Sub
```

This version should work better for your scenario. Please give it a try, and let me know if you encounter any issues or if you have any further specifications.

Will not work if team name is Manchester United

You're right, and I appreciate your patience. If the team names can have spaces, and you want to split the text based on the first occurrence of "v" while keeping both team names intact, you can use the following updated VBA macro:

```vba
Sub SplitText()
Dim originalText As String
Dim firstPart As String
Dim secondPart As String

' Get the text from the active cell
originalText = ActiveCell.Value

' Check if "v" exists in the text
If InStr(originalText, "v") > 0 Then
' Split the text into two parts using the first "v" as the delimiter
firstPart = Trim(Left(originalText, InStr(originalText, "v") - 1))
secondPart = Trim(Mid(originalText, InStr(originalText, "v"), Len(originalText)))

' Place the parts in adjacent cells
ActiveCell.Value = firstPart
ActiveCell.Offset(0, 1).Value = secondPart
Else
MsgBox "The text does not contain 'v'.", vbExclamation
End If
End Sub
```

This should work for cases where team names can include spaces. Please try this version, and let me know if it meets your requirements or if you have any further adjustments.


Would it be sufficient to have “ v “ instead of “v”

Sub SplitText()
Dim originalText As String
Dim firstPart As String
Dim secondPart As String

' Get the text from the active cell
originalText = ActiveCell.Value

' Check if " v " exists in the text
If InStr(originalText, " v ") > 0 Then
' Split the text into two parts using " v " as the delimiter
firstPart = Trim(Left(originalText, InStr(originalText, " v ") - 1))
secondPart = Trim(Mid(originalText, InStr(originalText, " v ") + 3, Len(originalText)))

' Place the parts in adjacent cells
ActiveCell.Value = firstPart
ActiveCell.Offset(0, 1).Value = secondPart
Else
MsgBox "The text does not contain ' v '.", vbExclamation
End If
End Sub

Would that work on a list of teams on different rows

Yes, the provided VBA macro can be adapted to work with a list of teams on different rows. You can apply the macro to each cell in the column containing your team names. Here's how you can modify the macro to handle a range of cells:

```vba
Sub SplitTextForRange()
Dim originalText As String
Dim firstPart As String
Dim secondPart As String
Dim cell As Range

' Loop through each cell in the selected range
For Each cell In Selection
' Get the text from the current cell
originalText = cell.Value

' Check if " v " exists in the text
If InStr(originalText, " v ") > 0 Then
' Split the text into two parts using " v " as the delimiter
firstPart = Trim(Left(originalText, InStr(originalText, " v ") - 1))
secondPart = Trim(Mid(originalText, InStr(originalText, " v ") + 3, Len(originalText)))

' Place the parts in adjacent cells
cell.Value = firstPart
cell.Offset(0, 1).Value = secondPart
Else
' Display a message if " v " is not found in the text
MsgBox "Cell " & cell.Address & " does not contain ' v '.", vbExclamation
End If
Next cell
End Sub
```

To use this macro:

1. Select the range of cells containing your team names.
2. Run the macro by pressing `ALT` + `F8`, selecting "SplitTextForRange," and clicking "Run."

This will process each cell in the selected range individually and split the text based on " v " as the delimiter.


Rich1950 :D :D
sniffer66
Posts: 1809
Joined: Thu May 02, 2019 8:37 am

In my (non Excel code) I just use "[Space]v[Space] as the delimiter. Works every time
Post Reply

Return to “AI, Machine Learning and Generative AI”