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?
Offline
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!)
Offline
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.
Offline
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
Offline
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?
Offline
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
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?
Offline
What language is this? JavaScript?
Offline
Hardmath123 wrote:
blob8108 wrote:
Hardmath123 wrote:
That's what I was getting at.Ohhh... that sounds quite interesting and extremely difficult
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.
Offline
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.
Offline
Bump. Blob and I may be restarting this.
Offline
Yay! 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!
Last edited by blob8108 (2012-11-09 11:57:48)
Offline
Sorry. I thought names were capitalized to show importance of the addressee...
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.
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.
Last edited by Hardmath123 (2012-11-09 12:17:49)
Offline
Hardmath123 wrote:
Sorry. I thought names were capitalized to show importance of the addressee...
And you complained when I called you HardMath...
We could support both via files/sockets.
...using a quick Python server! That's sorted, then.
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...
Offline
blob8108 wrote:
Hardmath123 wrote:
Sorry. I thought names were capitalized to show importance of the addressee...
And you complained when I called you HardMath...
We could support both via files/sockets.
...using a quick Python server! That's sorted, then.
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 ), 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.
Offline
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.
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.
EDIT: http://en.wikipedia.org/wiki/Kalah
Last edited by Hardmath123 (2012-11-10 00:41:44)
Offline
Yay, Python it is, I suppose. Let's just pick a game now.
Offline
Yay, Python!
...I'm going to have to code the interface, aren't I?
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)
Offline
blob8108 wrote:
Yay, Python!
...I'm going to have to code the interface, aren't I?
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?
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.
Last edited by Hardmath123 (2012-11-11 08:46:57)
Offline