Prop Chess (for VGA): Human Vs. Propeller

RaymanRayman Posts: 7,984
edited May 2013 in Propeller 1 Vote Up0Vote Down
Can you beat your Prop at Chess?

This is by no means complete, but I lost motivation when I started running out of room...

I think it knows all the rules and plays fairly.·

Also demonstrates my tricked out mouse...

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm

Post Edited (Rayman) : 6/20/2009 3:06:54 PM GMT
Prop Info and Apps: http://www.rayslogic.com/
«1

Comments

  • 39 Comments sorted by Date Added Votes
  • SapiehaSapieha Posts: 2,964
    edited June 2009 Vote Up0Vote Down
    Hi Rayman.

    It is not posible to have .dat files in High half in EEprom on ProtoBoard and load them on demand.
    That can give You more place for program area.
    To load them it is only ned for simple I2C handler

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Nothing is impossible, there are only different degrees of difficulty.
    For every stupid question there is at least one intelligent answer.
    Don't guess - ask instead.
    If you don't ask you won't know.
    If your gonna construct something, make it·as simple as·possible yet as versatile as posible.


    Sapieha
    Regards
    Sapieha
    _____________________________________________________
    Nothing is impossible, there are only different degrees of difficulty.
    For every stupid question there is at least one intelligent answer.
    Don't guess - ask instead.
    If you don't ask you won't know.
    If your gonna construct something, make it as simple as possible yet as versatile/usable as possible.
  • RaymanRayman Posts: 7,984
    edited June 2009 Vote Up0Vote Down
    There are some options... I could do as you say.

    I could use Baggers RLE code code compress the images.

    But, I think the easiest thing for me is to use my PSM module to do it on the LCD and use the PSM's SD card to store true color images...

    That should free up enough space to do a really nice job. But, honestly, I don't forsee having the time to complete this, which is why I posted it now...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
    Prop Info and Apps: http://www.rayslogic.com/
  • RaymanRayman Posts: 7,984
    edited June 2009 Vote Up0Vote Down
    PS: Anybody beat their Prop yet? It's not too hard, but it takes a while...

    The main things missing are opening and closing move libraries...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
    Prop Info and Apps: http://www.rayslogic.com/
  • hover1hover1 Posts: 1,927
    edited June 2009 Vote Up0Vote Down
    Rayman said...
    PS: Anybody beat their Prop yet? It's not too hard, but it takes a while...

    The main things missing are opening and closing move libraries...

    Played a quick game. Stalemate. But then again I'm stale. . Haven't played a good game in years since my son is grown and gone.

    Thanks for the memories! Next Prop against Prop.
    I have three propellers
  • stevenmess2004stevenmess2004 Posts: 1,099
    edited June 2009 Vote Up0Vote Down
    Rayman, looks great.

    However, there appear to be a couple of bugs in your code that does the black castling. Starting with a new game if I move my Kings pawn forward two the prop then moves far left pawn forward one, I then move Queen's Knight forward and right and the prop tries to castle on the Queen's side (sorry for all the wrong move and piece names, I don't know all the proper move notation.) It happened another time as well on the other side but it was further in the game and I can't remember what caused it.

    Nice Mouse too.
  • stevenmess2004stevenmess2004 Posts: 1,099
    edited June 2009 Vote Up0Vote Down
    Well, I just won a game. But after I won it put up a "Bad move.." on the left side of the screen. When it did the incorrect castle the other pieces (rook and bishop) were still under the other pieces and it also changed a pawn to a king at one stage. Maybe you've run out of stack space?
  • RaymanRayman Posts: 7,984
    edited June 2009 Vote Up0Vote Down
    Steven: Hmm... I thought I had all those bugs worked out... I'll have to double check that I've posted the latest version...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
    Prop Info and Apps: http://www.rayslogic.com/
  • LawsonLawson Posts: 870
    edited June 2009 Vote Up0Vote Down
    Castling is a bit buggy. Black had two queens and no king for a while, then three rooks and no king, then... Not too smart yet, I promoted a pawn mid game. The game didn't go well for the propeller from then on. Still, this is rather cool! I think the graphics are fine quality. If you're hurting for space to make the AI smarter I wouldn't mind cruder graphics even.

    Lawson

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Lunch cures all problems! have you had lunch?
    micro-power experiments with the propeller.
    Drivers for TAOS TSL3301 line sensor Forum thread, and OBEX
    Lumen Electronic Jewelery Website
    My AWD motorcycle Website and action video
    What I'm paid to work on. UW Lidar Group.
    FME, a Spin-only floating point library with trig, exponential, and logarithm functions. OBEX and Forum.
  • RaymanRayman Posts: 7,984
    edited June 2009 Vote Up0Vote Down
    Ok, sounds like there's a definite bug with castling... I'll try to find time to fix that...

    The AI could be dramatically improved with a little more code space. My current inclination is to do this with the help of the onboard LCD and SD card on my PSM module. Other alternative is to wait for Prop2...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
    Prop Info and Apps: http://www.rayslogic.com/
  • BADHABITBADHABIT Posts: 138
    edited June 2009 Vote Up0Vote Down
    The Prop2 is just a myth created to keep people put of by P1's limitations interested in Propelerness. It is perpetuated by very smart and well to do individuals because they believe in it as fact because their high priest said it was so.

    Therefore you should fix it up to run on the PSM, then everybody who got one would have a demo to show off all of PSM's featurization.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    BH skull.gif
  • stevenmess2004stevenmess2004 Posts: 1,099
    edited June 2009 Vote Up0Vote Down
    If nothing else it should be fairly easy to find the code that does the castling and just comment it out right?
  • RaymanRayman Posts: 7,984
    edited June 2009 Vote Up0Vote Down
    Strangely, a large percentage of the code is there just to handle little things like castling and en passant... I put a lot of effort into adding that and wouldn't want to take it out... Maybe I'll have time on my flight out to CA to look into what's wrong...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
    Prop Info and Apps: http://www.rayslogic.com/
  • ProcessingData...ProcessingData... Posts: 208
    edited June 2009 Vote Up0Vote Down
    Rayman said...
    PS: Anybody beat their Prop yet? It's not too hard, but it takes a while...
    Sweet! I beat it on the first try! I must be better at chess than I thought.
    Just a suggestion, you could make a Human Vs. Human option too, and put a "Propeller is thinking.."
    on the screen when it is the prop's turn, or just change the cursor to a propeller hat.smilewinkgrin.gif -- ProccessingData...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Basic Stamp,···· Propeller,·· · SX,·· FUN!


    START:·
    >Proccessing Data. . . .··
    >Task Complete. . .·.
    >Saving Data. . . .
    >Entering SLEEP Mode. . . .
    >Signing OFF


    ·
  • RaymanRayman Posts: 7,984
    edited June 2009 Vote Up0Vote Down
    PD:· I posted human V human last year!:

    http://forums.parallax.com/showthread.php?p=747318



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
    Prop Info and Apps: http://www.rayslogic.com/
  • HumanoidoHumanoido Posts: 5,770
    edited February 2011 Vote Up0Vote Down
    Is there a TV version of Chess for a parallax 320x240 pixel TV?
  • RaymanRayman Posts: 7,984
    edited February 2011 Vote Up0Vote Down
    Wow, that was a long time ago... I think it could work for TV, but seems I never did it...
    I'm trying to remember why not... I think it was because I wanted a nice mouse and couldn't find one for TV...
    Prop Info and Apps: http://www.rayslogic.com/
  • HumanoidoHumanoido Posts: 5,770
    edited March 2011 Vote Up0Vote Down
    The mouse oddly seems a difficult proposition for the TV. How about a key entry instead of a mouse? We have a standard keyboard driver..
  • ridgerider30ridgerider30 Posts: 1
    edited April 2012 Vote Up0Vote Down
    cool thats really something
  • User NameUser Name Posts: 1,451
    edited April 2012 Vote Up0Vote Down
    Sure is! I didn't know anything about it...thanks for dredging it up. Seems like a great idea to use a TV object, or else keep the slick VGA/mouse interface and use a second prop to run the chess engine.
    Platåberget
  • RaymanRayman Posts: 7,984
    edited April 2012 Vote Up0Vote Down
    Haven't thought about this in a long time... Actually, now with my new DVI/HDMI graphics shield, I think I can do a much better job...
    Offloading the graphics and screen buffer to the SSD1963 will free up a ton of space. Maybe I can make work right then...
    Prop Info and Apps: http://www.rayslogic.com/
  • jmgjmg Posts: 9,001
    edited April 2012 Vote Up0Vote Down
    How about a Prop II ? Where is the bottle neck in this ?
  • RaymanRayman Posts: 7,984
    edited April 2012 Vote Up0Vote Down
    There was not bottleneck, just not enough memory...
    Prop II will also solve that problem and be faster too...
    Prop Info and Apps: http://www.rayslogic.com/
  • cavelambcavelamb Posts: 644
    edited April 2012 Vote Up0Vote Down
    Rayman wrote: »
    There was not bottleneck, just not enough memory...
    Prop II will also solve that problem and be faster too...


    If Prop 2 were just a Prop 1 with 2 to 4 times the memory it would be a huge hit...

    32K bytes or ram is a huge sandbox for a micro-controller.
    But this thing really isn't (just) a micro-controller.

    It was intended to do video work, and that takes lots of memory.

    What about it guys?
    Would it be technically possible to cut and paste some more memory on the die?
  • User NameUser Name Posts: 1,451
    edited April 2012 Vote Up0Vote Down
    cavelamb wrote: »
    If Prop 2 were just a Prop 1 with 2 to 4 times the memory it would be a huge hit...
    Would it be technically possible to cut and paste some more memory on the die?

    I love the idea. But there's enormous work involved in changing the word size; and with the current word size there are only nine bits for the source and destination fields of the RDLONG and WRLONG instructions. So one would have to implement something like a bank select register, as in the fine tradition of the SX. I know PhiPi and others hate segmented memory. But since it's just HUB RAM and not COG RAM, is it really a big deal?

    One other comment: I'd love to see the logic synthesis tools currently being applied to the Prop 2 COG Verilog model get applied to the Prop 1 COG Verilog description. The resulting compilation might be quite tiny in terms of silicon real estate, facilitating more HUB RAM and/or more COGs.
    Platåberget
  • cavelambcavelamb Posts: 644
    edited April 2012 Vote Up0Vote Down
    Uh, ok. You lost me there.

    Doubling memory size just needs one more address line. (and decoding, of course)

    After years of x86 assembly I'd barf on a segment approach too.
    But it's just not necessary.

    I don't see more cogs as necessary either.

    But more memory? Oh yeah....
  • RaymanRayman Posts: 7,984
    edited April 2012 Vote Up0Vote Down
    Another approach is to use "large" memory model of Catalina to do it arbitrarily big in C with Prop1.
    Would probably actually be faster than my Spin code here...
    Prop Info and Apps: http://www.rayslogic.com/
  • Heater.Heater. Posts: 18,247
    edited April 2012 Vote Up0Vote Down
    Uersname,

    Increasing the size of HUB RAM is not limited by the 9 bits of the Prop instructions source and destination fields. That only limits COG memory address range.

    Don't forget that RD/WRBYTE/WORD/LONG can use the entire 32 bits of a COG location as the HUB address giving a potential 4GB HUB address range.
  • ericballericball Posts: 766
    edited April 2012 Vote Up0Vote Down
    @Heater, the 64K HUB address space is dictated by COGINIT which squeezes two 14 bit addresses into the destination register.
    Pay for your free software - let the developers know how much you appreciate their work!

    Links to Propeller stuff I've done (mostly composite video)
  • User NameUser Name Posts: 1,451
    edited April 2012 Vote Up0Vote Down
    The inner machinations of the Propeller are more of an enigma than I though. Thanks eric & heater for giving me something to research (or recover) this morning.
    Platåberget
  • Heater.Heater. Posts: 18,247
    edited April 2012 Vote Up0Vote Down
    ericball,

    Good point re: the addressing limits of COGINIT. Although if you were wanting a 4GB address space in HUB tweaking the COGINT instruction might me just a minor part of the work.

    Which makes me wonder how COGINIT will work on the Prop II where there is more than 64K RAM.
Sign In or Register to comment.