This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#226 2012-06-26 18:32:43

amcerbu
Scratcher
Registered: 2009-07-21
Posts: 500+

Re: AI Strategy Tournament: Rescheduled to June 1st

Ah, well, I hope it doesn't fall apart.

Offline

 

#227 2012-07-25 07:31:46

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: AI Strategy Tournament: Rescheduled to June 1st

Bump. How about (don't faint) Rock Paper Scissors? We can create AIs which try to understand other AIs. That sounds cool on so many levels to me. What do you guys think?


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#228 2012-07-25 08:50:39

MoreGamesNow
Scratcher
Registered: 2009-10-12
Posts: 1000+

Re: AI Strategy Tournament: Rescheduled to June 1st

Hardmath123 wrote:

Bump. How about (don't faint) Rock Paper Scissors? We can create AIs which try to understand other AIs. That sounds cool on so many levels to me. What do you guys think?

Just out of curiosity, have you heard of the "prisoner's dilemma".  They've had tournaments of that before in the "real" world.  With either Rock Paper Scissors or the prisoner's dilemma, we should all try to refrain from research as much as possible, as both probably already have professional answers (though you could write a program that tries to deduce the logic that another program is using, that would be cool!)


http://images2.layoutsparks.com/1/218929/rubiks-cube-animated-rotating.gif
"Cogito ergo sum" --  I think, therefore I am

Offline

 

#229 2012-07-25 09:19:24

SciTecCf
Scratcher
Registered: 2011-11-23
Posts: 1000+

Re: AI Strategy Tournament: Rescheduled to June 1st

Now now, how about we do something like Ludo?

If not, I'm glad to settle with Chess.  smile


http://bit.ly/LCZEJRhttp://bit.ly/LSONcOhttp://bit.ly/LF3vIc
http://trinary.site40.net/images/scratchrank.php?username=SciTecCf&display=small

Offline

 

#230 2012-07-25 11:00:52

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: AI Strategy Tournament: Rescheduled to June 1st

MoreGamesNow wrote:

(though you could write a program that tries to deduce the logic that another program is using, that would be cool!)

That's what I was getting at.


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#231 2012-07-25 12:02:57

SciTecCf
Scratcher
Registered: 2011-11-23
Posts: 1000+

Re: AI Strategy Tournament: Rescheduled to June 1st

I can do a chess AI, I've already got a pretty good idea of how it'll work.


http://bit.ly/LCZEJRhttp://bit.ly/LSONcOhttp://bit.ly/LF3vIc
http://trinary.site40.net/images/scratchrank.php?username=SciTecCf&display=small

Offline

 

#232 2012-07-25 12:48:20

blob8108
Scratcher
Registered: 2007-06-25
Posts: 1000+

Re: AI Strategy Tournament: Rescheduled to June 1st

Hardmath123 wrote:

MoreGamesNow wrote:

(though you could write a program that tries to deduce the logic that another program is using, that would be cool!)

That's what I was getting at.

Ohhh... that sounds quite interesting and extremely difficult  big_smile


Things I've made: kurt | scratchblocks2 | this cake

Offline

 

#233 2012-07-25 20:17:33

ohaiderstudios
Scratcher
Registered: 2010-10-31
Posts: 100+

Re: AI Strategy Tournament: Rescheduled to June 1st

I might join, depending on the game...

Rock Paper Scissors would be very interesting. It would be really easy to program, yet making it understand the opponent's strategy would be a challenge.

How about Rock Paper Scissors Lizard Spock?


Fork Clamor on GitHub!

Offline

 

#234 2012-07-25 21:24:31

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: AI Strategy Tournament: Rescheduled to June 1st

blob8108 wrote:

Hardmath123 wrote:

MoreGamesNow wrote:

(though you could write a program that tries to deduce the logic that another program is using, that would be cool!)

That's what I was getting at.

Ohhh... that sounds quite interesting and extremely difficult  big_smile

Yeah. So since quite a few people seem to agree, let's try and formalize how it would work. You need to write a function which returns "R", "P", or "S", and I think a cache object would be helpful if provided. What am I forgetting?


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#235 2012-07-25 23:28:46

ohaiderstudios
Scratcher
Registered: 2010-10-31
Posts: 100+

Re: AI Strategy Tournament: Rescheduled to June 1st

What language is this? JavaScript?


Fork Clamor on GitHub!

Offline

 

#236 2012-07-26 00:36:21

SciTecCf
Scratcher
Registered: 2011-11-23
Posts: 1000+

Re: AI Strategy Tournament: Rescheduled to June 1st

ohaiderstudios wrote:

What language is this? JavaScript?

I think it's in Scratch, but I'm not sure.


http://bit.ly/LCZEJRhttp://bit.ly/LSONcOhttp://bit.ly/LF3vIc
http://trinary.site40.net/images/scratchrank.php?username=SciTecCf&display=small

Offline

 

#237 2012-07-26 04:13:39

blob8108
Scratcher
Registered: 2007-06-25
Posts: 1000+

Re: AI Strategy Tournament: Rescheduled to June 1st

Hardmath123 wrote:

blob8108 wrote:

Hardmath123 wrote:


That's what I was getting at.

Ohhh... that sounds quite interesting and extremely difficult  big_smile

Yeah. So since quite a few people seem to agree, let's try and formalize how it would work. You need to write a function which returns "R", "P", or "S", and I think a cache object would be helpful if provided. What am I forgetting?

I think you need to send the results of the last game (ie, what the opponent played, and so who won) — preferably with some sort of opponent ID so it can try to model strategies for individual opponents.


Things I've made: kurt | scratchblocks2 | this cake

Offline

 

#238 2012-07-26 06:42:45

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: AI Strategy Tournament: Rescheduled to June 1st

SciTecCf wrote:

ohaiderstudios wrote:

What language is this? JavaScript?

I think it's in Scratch, but I'm not sure.

Yeah, it's JS.

@blob Yeah, that's what I was missing. So we need a cache object for each player and a global log with each game played, the winner, and what the winner moved.


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#239 2012-10-02 09:08:09

roijac
Scratcher
Registered: 2010-01-19
Posts: 1000+

Re: AI Strategy Tournament: Rescheduled to June 1st

BUMP

what do you say about prisoner's dilema tournament? each one sends 2-3 strategies (enclosed in sprites) and we make them play against each other?

(yeah, i know it's been made)

Offline

 

#240 2012-11-09 11:33:23

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: AI Strategy Tournament: Rescheduled to June 1st

Bump. Blob and I may be restarting this.  big_smile


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#241 2012-11-09 11:56:55

blob8108
Scratcher
Registered: 2007-06-25
Posts: 1000+

Re: AI Strategy Tournament: Rescheduled to June 1st

Yay!  big_smile  What technology shall we use? JS/Canvas? WebGL? Python/Pygame? The possiblities are endless (but at least finite)...

Hardmath123 wrote:

Blob and I may be restarting this.

...you capitalised my name wrong!  yikes   tongue

Last edited by blob8108 (2012-11-09 11:57:48)


Things I've made: kurt | scratchblocks2 | this cake

Offline

 

#242 2012-11-09 12:14:19

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: AI Strategy Tournament: Rescheduled to June 1st

Sorry. I thought names were capitalized to show importance of the addressee...  tongue

Ok, blob, I think we should limit to either JS/Canvas or pure Python without any fancy graphics. To be honest, I'm kind of loving Python.  smile

EDIT: If we use pure Python, setting up a programming interface would be easier, we use a simple module-subclass based approach, where each of us write a subclass of a given base class we write together beforehand. If we use JS, we can get cool canvas graphics, and better GUI-based testing environments. JS also gives us a nice OOP-based coding framework, though Python is better. More people on Scratch probably know JS, which may be an advantage; though I do know a few Python-enthusiasts. We could support both via files/sockets.  hmm

Last edited by Hardmath123 (2012-11-09 12:17:49)


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#243 2012-11-09 15:58:36

blob8108
Scratcher
Registered: 2007-06-25
Posts: 1000+

Re: AI Strategy Tournament: Rescheduled to June 1st

Hardmath123 wrote:

Sorry. I thought names were capitalized to show importance of the addressee...

And you complained when I called you HardMath...  tongue

We could support both via files/sockets.  hmm

...using a quick Python server! That's sorted, then.  tongue
And I have a Pygame library lying around somewhere; we could use that!

Seriously, though:

If we use pure Python, setting up a programming interface would be easier, we use a simple module-subclass based approach, where each of us write a subclass of a given base class we write together beforehand. If we use JS, we can get cool canvas graphics, and better GUI-based testing environments. JS also gives us a nice OOP-based coding framework, though Python is better. More people on Scratch probably know JS, which may be an advantage; though I do know a few Python-enthusiasts. We could support both via files/sockets.

I'd say the interface is about the same — as we discussed before, the AI only really needs a single function (and possibly some way to store state between calls). I'd say JS and Python are about equal in this respect; it's not much harder to write a decent interface/framework in either. (Although isn't JS prototypal inheritance? Maybe that isn't mutually exclusive to OOP...)

It is ridiculously easy to build UI in JS, I'll give you that.

We could support both Python/JS (and Mesh, even!) — but less people will bother to setup a Python runtime, I feel. It sounds like JS would be better if other people want to join; and Python if it's just the two of us? Maybe we should come up with our problem (Hex, again?) and see if there's any interest...


Things I've made: kurt | scratchblocks2 | this cake

Offline

 

#244 2012-11-09 23:58:08

ohaiderstudios
Scratcher
Registered: 2010-10-31
Posts: 100+

Re: AI Strategy Tournament: Rescheduled to June 1st

blob8108 wrote:

Hardmath123 wrote:

Sorry. I thought names were capitalized to show importance of the addressee...

And you complained when I called you HardMath...  tongue

We could support both via files/sockets.  hmm

...using a quick Python server! That's sorted, then.  tongue
And I have a Pygame library lying around somewhere; we could use that!

Seriously, though:

If we use pure Python, setting up a programming interface would be easier, we use a simple module-subclass based approach, where each of us write a subclass of a given base class we write together beforehand. If we use JS, we can get cool canvas graphics, and better GUI-based testing environments. JS also gives us a nice OOP-based coding framework, though Python is better. More people on Scratch probably know JS, which may be an advantage; though I do know a few Python-enthusiasts. We could support both via files/sockets.

I'd say the interface is about the same — as we discussed before, the AI only really needs a single function (and possibly some way to store state between calls). I'd say JS and Python are about equal in this respect; it's not much harder to write a decent interface/framework in either. (Although isn't JS prototypal inheritance? Maybe that isn't mutually exclusive to OOP...)

It is ridiculously easy to build UI in JS, I'll give you that.

We could support both Python/JS (and Mesh, even!) — but less people will bother to setup a Python runtime, I feel. It sounds like JS would be better if other people want to join; and Python if it's just the two of us? Maybe we should come up with our problem (Hex, again?) and see if there's any interest...

I would prefer Python (2.7  tongue ), but not pygame. I've never really used pygame and I think GUIs are overrated.

And yes, if I can find the time, I'm still in.


Fork Clamor on GitHub!

Offline

 

#245 2012-11-10 00:35:23

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: AI Strategy Tournament: Rescheduled to June 1st

I haven't use pygame either, and I'm not particularly anxious to learn. I think if most of the people who play are Python people, we should just use Python. We can output the game as a file and animate it in JS afterwards just so we have something to show off at the end.  tongue

For a game besides Hex, how about Mancala? Basically, imagine 4 pennies in each hole of a 12-egg egg carton, and an empty cup at each end. In each move, you pick up all pennies in one hole on your side of the egg carton and going counter-clockwise drop 1 penny in each hole + 1 in the cup if you pass it. When all pennies are gone, the person with the most pennies in his cup wins (your cup is the one to your right). There are more rules, this is just an outline.  smile

EDIT: http://en.wikipedia.org/wiki/Kalah

Last edited by Hardmath123 (2012-11-10 00:41:44)


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#246 2012-11-10 13:23:10

roijac
Scratcher
Registered: 2010-01-19
Posts: 1000+

Re: AI Strategy Tournament: Rescheduled to June 1st

+1 for mancala
+10 for python  wink

I'm in if you code the interface, bit busy with M30W right now  hmm

Offline

 

#247 2012-11-10 22:45:31

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: AI Strategy Tournament: Rescheduled to June 1st

Yay, Python it is, I suppose.  smile  Let's just pick a game now.


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#248 2012-11-11 06:33:35

blob8108
Scratcher
Registered: 2007-06-25
Posts: 1000+

Re: AI Strategy Tournament: Rescheduled to June 1st

Yay, Python!  smile

...I'm going to have to code the interface, aren't I?  tongue

Edit: For the interface — it would be really nice for a human to be able to play against the AI whilst developing it, as well as watch the AIs play each other. How about an HTML/Ajax interface with a Twisted/Python backend? (I'll code the Twisted stuff...) We could have a simple HTTP interface returning JSON objects (or even use WebSockets!).

Last edited by blob8108 (2012-11-11 06:35:51)


Things I've made: kurt | scratchblocks2 | this cake

Offline

 

#249 2012-11-11 07:52:26

roijac
Scratcher
Registered: 2010-01-19
Posts: 1000+

Re: AI Strategy Tournament: Rescheduled to June 1st

prisoners dilemma, any1?

Offline

 

#250 2012-11-11 08:06:05

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: AI Strategy Tournament: Rescheduled to June 1st

blob8108 wrote:

Yay, Python!  smile

...I'm going to have to code the interface, aren't I?  tongue

Edit: For the interface — it would be really nice for a human to be able to play against the AI whilst developing it, as well as watch the AIs play each other. How about an HTML/Ajax interface with a Twisted/Python backend? (I'll code the Twisted stuff...) We could have a simple HTTP interface returning JSON objects (or even use WebSockets!).

That's a wonderful idea! I've made Python backends with CGIHTTPServer, so I'll code it up (not to mention I'm great with <Canvas> UIs, so we're good that way, too). We could use AJAX queries like MOVE.py?player=hardmath&boardpos=…. MOVE.py should be modified with the AIs added in.

How much sense am I making?  tongue

Also, we really need to pick a game soon. Hex or Mancala would be my main choices, but both are biased towards the first mover.

EDIT: Kind of unrelated, but where can I find the .py source of the modules? I can find all the pyc/pyo-optimized files, but I obviously can't read those.  hmm

Last edited by Hardmath123 (2012-11-11 08:46:57)


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

Board footer