Battle boat AI contest!
65 posts • Page 2 of 3 • 1, 2, 3
Re: Battle boat AI contest!
Kilinich - Any chance that you could create a read-only variable that shows how many boats are in the battle? I need to make a slight adjustment to my strategy depending on how many boats are fighting in each battle. Maybe call it _numberOfBoats or something like that.
Thanks
Thanks
Last edited by Xray on Sat Jan 19, 2013 5:48 pm, edited 1 time in total.
-
Xray - Posts: 500
- Joined: Sun Jun 17, 2012 6:12 am
- Location: USA
Re: Battle boat AI contest!
No, I don't think so. Your eyes is radar only /-)
Dream of Algodoo as game development engine...
-
Kilinich - [Best bug reporter 2010]
- Posts: 2098
- Joined: Mon Aug 31, 2009 8:27 pm
- Location: South Russia
Re: Battle boat AI contest!
Is it possible to know the amount of damage to an enemy boat that has been detected on radar? Can we know anything about an enemy boat that has been detected?
Also, I am confused about _RadarRange. If we can't change the range, is there any use to having it?
Also, I am confused about _RadarRange. If we can't change the range, is there any use to having it?
Phundementalism?
Ain't nobody got thyme fo dat.
Ain't nobody got thyme fo dat.
-
mold999 - Posts: 225
- Joined: Sun Jan 02, 2011 1:35 am
- Location: [176436, 3763234]
Re: Battle boat AI contest!
mold999 wrote:Also, I am confused about _RadarRange. If we can't change the range, is there any use to having it?
have you ever heard of Anton–Babinski_syndrome? google it.
with that being said, knowing how far you can see can change how aggressive you are in your search for other boats, and even your search patterns, if you have any
- jon_joy_1999
- Posts: 233
- Joined: Fri Dec 09, 2011 12:51 am
Re: Battle boat AI contest!
mold999 has a good point. According to Kilinich's spreadsheet, you can get the radar range by reading _RadarRange, but there is no way to change it. BUT, when I look at the list of available functions in the "AI box", there is a function called _setRadarRange! So, apparently, there is a way you can change the radar range from the default 100 meters. But mold999's question was "is there any use to having it?", and that is a very good question because I cannot think of any good reason for changing the radar range from its default value. And besides that, all you really need is to set the gun range to your target range for destroying the other boat! So, maybe Kilinich could shed some light on this issue....
-
Xray - Posts: 500
- Joined: Sun Jun 17, 2012 6:12 am
- Location: USA
Re: Battle boat AI contest!
The idea is you can change radar range and sector via _setRadarRange/_setRadarSector.
This two parameters are connected, so then you extend range, sector will be thin (and wide radar is short-range).
I decide not to publish that in first version, I think it's too complex.
This two parameters are connected, so then you extend range, sector will be thin (and wide radar is short-range).
I decide not to publish that in first version, I think it's too complex.
Dream of Algodoo as game development engine...
-
Kilinich - [Best bug reporter 2010]
- Posts: 2098
- Joined: Mon Aug 31, 2009 8:27 pm
- Location: South Russia
Re: Battle boat AI contest!
Ah, I think I understand.
The radar sector widens the beam, but shortens the range?
Also, can we know anything about an enemy boat that has been detected on radar? Can we know an enemy boat's heading, or speed, or damage?
The radar sector widens the beam, but shortens the range?
Also, can we know anything about an enemy boat that has been detected on radar? Can we know an enemy boat's heading, or speed, or damage?
Phundementalism?
Ain't nobody got thyme fo dat.
Ain't nobody got thyme fo dat.
-
mold999 - Posts: 225
- Joined: Sun Jan 02, 2011 1:35 am
- Location: [176436, 3763234]
Re: Battle boat AI contest!
mold999 wrote:Also, can we know anything about an enemy boat that has been detected on radar? Can we know an enemy boat's heading, or speed, or damage?
No, the idea is you need to calculate it!
Dream of Algodoo as game development engine...
-
Kilinich - [Best bug reporter 2010]
- Posts: 2098
- Joined: Mon Aug 31, 2009 8:27 pm
- Location: South Russia
Re: Battle boat AI contest!
Kilinich wrote:
No, the idea is you need to calculate it!
mold999 - I hope you didn't think that this competition would be EASY!
-
Xray - Posts: 500
- Joined: Sun Jun 17, 2012 6:12 am
- Location: USA
Re: Battle boat AI contest!
Not quite what I meant
Nevermind
EDIT
-----
Slight bug, the boats can go outside the fighting area!
Nevermind
EDIT
-----
Slight bug, the boats can go outside the fighting area!
Phundementalism?
Ain't nobody got thyme fo dat.
Ain't nobody got thyme fo dat.
-
mold999 - Posts: 225
- Joined: Sun Jan 02, 2011 1:35 am
- Location: [176436, 3763234]
Re: Battle boat AI contest!
mold999 wrote:Slight bug, the boats can go outside the fighting area!
oh... that must be fixed... hang on!
Dream of Algodoo as game development engine...
-
Kilinich - [Best bug reporter 2010]
- Posts: 2098
- Joined: Mon Aug 31, 2009 8:27 pm
- Location: South Russia
Re: Battle boat AI contest!
Could you explain a little more about these?
_angleDiff(a1, a2)
_sign(x)
_abs(x)
_dist(v)
_angle(v)
I understand _abs(x), but not the others.
EDIT
-----
Also, how do you make custom functions like these?
_angleDiff(a1, a2)
_sign(x)
_abs(x)
_dist(v)
_angle(v)
I understand _abs(x), but not the others.
EDIT
-----
Also, how do you make custom functions like these?
Phundementalism?
Ain't nobody got thyme fo dat.
Ain't nobody got thyme fo dat.
-
mold999 - Posts: 225
- Joined: Sun Jan 02, 2011 1:35 am
- Location: [176436, 3763234]
Re: Battle boat AI contest!
_angleDiff(a1, a2) - angle between two angles. a1 and a2 may be any angle, not only from -pi to pi but result is within that borders.
_sign(x) - returns 1 if x positive and -1 if negative
_abs(x) - returns absolute value of x (without sign)
_dist(v) - returns length of vector v [x,y]
_angle(v) - returns angle between 0x and vector v [x,y]
_sign(x) - returns 1 if x positive and -1 if negative
- Code: Select all
_sign(-13.4)
-1
_abs(x) - returns absolute value of x (without sign)
- Code: Select all
_abs(-7)
7
_dist(v) - returns length of vector v [x,y]
- Code: Select all
_dist([1,1]-[1,2])
1
_angle(v) - returns angle between 0x and vector v [x,y]
- Code: Select all
_angle([1,10]-[1,1])
1.5707964
Dream of Algodoo as game development engine...
-
Kilinich - [Best bug reporter 2010]
- Posts: 2098
- Joined: Mon Aug 31, 2009 8:27 pm
- Location: South Russia
Re: Battle boat AI contest!
Kilinich - How will you determine who battles who? For example, if a total of five people enter in February, will you randomly select four of them to battle each other, and then have the winner battle the fifth contestant? Have you given much thought to how that will work?
Also, will the deadline for entering the February contest be midnight (GMT) January 31? Since you will run the contest on Feb 01, I assume that you want all entries in before that date. Right?
Also, how will the actual races be shown? Will you make YouTube videos of them?
Also, will the deadline for entering the February contest be midnight (GMT) January 31? Since you will run the contest on Feb 01, I assume that you want all entries in before that date. Right?
Also, how will the actual races be shown? Will you make YouTube videos of them?
-
Xray - Posts: 500
- Joined: Sun Jun 17, 2012 6:12 am
- Location: USA
Re: Battle boat AI contest!
Schedule published in the first post, all battles will be recorded and uploaded on youtube.
Dream of Algodoo as game development engine...
-
Kilinich - [Best bug reporter 2010]
- Posts: 2098
- Joined: Mon Aug 31, 2009 8:27 pm
- Location: South Russia
Re: Battle boat AI contest!
How do you make the custom functions like _abs(x)?
Is there a scene.my.* variable?
Is there a scene.my.* variable?
Phundementalism?
Ain't nobody got thyme fo dat.
Ain't nobody got thyme fo dat.
-
mold999 - Posts: 225
- Joined: Sun Jan 02, 2011 1:35 am
- Location: [176436, 3763234]
Re: Battle boat AI contest!
mold999 - There are lots of threads in the forum that explain how to create functions and variables, such as here: http://www.algodoo.com/forum/viewforum.php?f=13
As for "scene.my" variables, kilinich has a rule that you may not use them in the AI box for the battle boats.
Hope this helps....
As for "scene.my" variables, kilinich has a rule that you may not use them in the AI box for the battle boats.
Hope this helps....
-
Xray - Posts: 500
- Joined: Sun Jun 17, 2012 6:12 am
- Location: USA
Re: Battle boat AI contest!
I know about the no scene.my.*s, I was wondering if the functions required a scene.my.* to work.
I searched "custom functions" but there was nothing that I could find which had any relevant information.
I searched "custom functions" but there was nothing that I could find which had any relevant information.
Phundementalism?
Ain't nobody got thyme fo dat.
Ain't nobody got thyme fo dat.
-
mold999 - Posts: 225
- Joined: Sun Jan 02, 2011 1:35 am
- Location: [176436, 3763234]
Re: Battle boat AI contest!
When I make my own local functions and variables, I begin each with the underscore character, for example, _var1. When you create a local variable in a geometry, it can only be accessed within the geometry where it was created, unlike "scene.my" variables which are global variables, and can be accessed from any other geometry. You can create a local function by writing the function in the script menu. For example, let's say you want to create Kilinich's absolute value function: you simply enter in the text box in the upper left corner of the script menu: _abs:=(x)=>{x < 0 ? - x : x}. When you hit Enter, the function will be created, and you should see it in the menu.
EDIT- No, the functions do not REQUIRE a scene.my variable to work.
EDIT- No, the functions do not REQUIRE a scene.my variable to work.
-
Xray - Posts: 500
- Joined: Sun Jun 17, 2012 6:12 am
- Location: USA
Re: Battle boat AI contest!
Ah, I see. I just wanted to know the syntax for custom functions. I understand the geometry-specific variables.
Большое спасибо!
Большое спасибо!
Phundementalism?
Ain't nobody got thyme fo dat.
Ain't nobody got thyme fo dat.
-
mold999 - Posts: 225
- Joined: Sun Jan 02, 2011 1:35 am
- Location: [176436, 3763234]
Re: Battle boat AI contest!
mold999 wrote:Ah, I see. I just wanted to know the syntax for custom functions. I understand the geometry-specific variables.
Большое спасибо!
Most of us here had to learn about Thyme scripting the hard way, that is, by searching, asking, and experimenting. There are some good tutorials in the forums, but you cannot always find exactly what you are looking for, so you might need to "reverse engineer" other scenes to find what you are looking for. There is no one major source or book or website that will tell you everything there is about Thyme scripting, because there ain't none! So, learning Thyme scripting is generally a matter of searching, asking, and experimenting on your own. That's how I learned it. Of course if you have previous programming exprience, then the leraning curve will be much shorter than if you have little or no exprience at all.
-
Xray - Posts: 500
- Joined: Sun Jun 17, 2012 6:12 am
- Location: USA
Re: Battle boat AI contest!
I have done some reverse engineering before, but most of it makes no sense without someone explaining some of the variables.
Must... stay... on... topic...
Anyway, I see what you're saying.
Must... stay... on... topic...
Anyway, I see what you're saying.
Phundementalism?
Ain't nobody got thyme fo dat.
Ain't nobody got thyme fo dat.
-
mold999 - Posts: 225
- Joined: Sun Jan 02, 2011 1:35 am
- Location: [176436, 3763234]
Re: Battle boat AI contest!
mold999 wrote:I have done some reverse engineering before, but most of it makes no sense without someone explaining some of the variables.
I totally agree with you. Learning this stuff has been a struggle for me, and it continues to be. I've learned a lot over the past few months, and I have a long way to go before I will become fluent in it (Emil, the developer, occasionally adds new features to it, and so it continues to evolve). I'll probably never get to Kilinich's level (actually, most people won't) because he is the "Master Guru" when it comes to Thyme scripting. He is very good at it mainly because of his previous programming experience, and he seems to have an intrinsic talent for this stuff. Hang in there, and in thyme it will all make sense (pun intended! )
-
Xray - Posts: 500
- Joined: Sun Jun 17, 2012 6:12 am
- Location: USA
Re: Battle boat AI contest!
If you don't want to anybody see your AI boat before battle - upload scene as reply and delete it.
I can see deleted scenes (as admin) but other people don't.
I can see deleted scenes (as admin) but other people don't.
Dream of Algodoo as game development engine...
-
Kilinich - [Best bug reporter 2010]
- Posts: 2098
- Joined: Mon Aug 31, 2009 8:27 pm
- Location: South Russia
Re: Battle boat AI contest!
Can't we just copy the _AI code, and send you a PM?
Phundementalism?
Ain't nobody got thyme fo dat.
Ain't nobody got thyme fo dat.
-
mold999 - Posts: 225
- Joined: Sun Jan 02, 2011 1:35 am
- Location: [176436, 3763234]
65 posts • Page 2 of 3 • 1, 2, 3
Who is online
Users browsing this forum: No registered users and 16 guests