Page 1 of 2 12 LastLast
Results 1 to 10 of 16
Like Tree2Likes

Thread: Prototype Carpentry Stuff

  1. #1
    Junior Member
    12pool3 is offline

    Posts
    4

    Prototype Carpentry Stuff

    Doesn't work quite that well yet...



    Anybody point me in the right direction about why my AI sucks so hard?

    EDIT: At the start it's just me playing! When I start pressing the button is when the AI does stuff.
    Last edited by 12pool3; 05-05-2013 at 08:43 PM.

  2. #2
    Senior Member
    pplover23 is offline

    Posts
    179
    one thing I noticed was its painfully slow, good luck getting any higher then a low excellent.

  3. #3
    Junior Member
    12pool3 is offline

    Posts
    4
    Haha, actually at the start it's just me playing. The button at the bottom is used to make the AI do it. I don't think speed is the issue here, it's really just the algorithm used! Doesn't seem to do too well, watch the video near the end

    This is my criteria for each move at the moment:
    - Prefers to complete holes (score += 30)
    - Prefers to fill empty areas (score += 10)
    - Prefers ability to fill remaining empty space with tool pieces
    (score += fits*fits*2, fits is the number of tool pieces that fit the remaining space)
    - Prefer to avoid overlaps (use every cell of the pentomino), (score += holesFilled)
    - Prefer pieces placed closer to edges (scored based on distance from center of hole).
    - Prefer to use rare piece (these are typically harder to place)

  4. #4
    Administrator
    Face is offline

    Posts
    2,116
    well other than the holes you have are really arbitrary. Very rarely does a hole have a perfect square/rectangle.
    12pool3 likes this.

  5. #5
    Junior Member
    12pool3 is offline

    Posts
    4
    Hmm, yeah, I thought about scoring it based on how 'square' the empty space remaining is, but I kind of felt I could it without that. I'll try that now. To be honest, I'm terrible at puzzle pirates, which is pretty much the motivation here.
    Thanks for the feedback.

  6. #6
    #Return
    Scarecrow is offline

    Posts
    3,443
    Looks awesome! What are you coding that in?

    Edit: Ah! I see it's in Java from the top left corner of the bot.
    Last edited by Scarecrow; 05-05-2013 at 11:48 PM.

  7. #7
    Bot Coder
    flashbang is offline

    Posts
    584
    Quote Originally Posted by 12pool3 View Post
    Hmm, yeah, I thought about scoring it based on how 'square' the empty space remaining is, but I kind of felt I could it without that. I'll try that now. To be honest, I'm terrible at puzzle pirates, which is pretty much the motivation here.
    Thanks for the feedback.
    If you look in the different puzzle guides there are tables at which percentage you will get which pieces. Try to put that in your scoring and well, just calculate all possible moves to fill the hole and see which uses the most of the most common ones. Also a smart control of which hole needs what will be useful then, putting some holes on hold which need less common pieces and try to get those by filling other holes.

    Just some ideas I had thinking about the carp bot.

    //siggy by Poseidon

  8. #8
    Senior Member
    trickshot17 is offline

    Posts
    110
    you are going to need to account for the fact that you have a maximum length of time that you can take before you place a piece in a particular hole (gets all shaky, then bad things happen).

  9. #9
    Senior Member
    erik is offline

    Posts
    343
    Quote Originally Posted by flashbang View Post
    If you look in the different puzzle guides there are tables at which percentage you will get which pieces. Try to put that in your scoring and well, just calculate all possible moves to fill the hole and see which uses the most of the most common ones. Also a smart control of which hole needs what will be useful then, putting some holes on hold which need less common pieces and try to get those by filling other holes.

    Just some ideas I had thinking about the carp bot.
    He should also put those percentages for the things that spawn in the middle too.
    He got alot of rare pieces in that session. xD

  10. #10
    Bot Coder
    flashbang is offline

    Posts
    584
    Quote Originally Posted by erik View Post
    He should also put those percentages for the things that spawn in the middle too.
    He got alot of rare pieces in that session. xD
    That was what I meant as well, sorry, my english is not the best

    //siggy by Poseidon

Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •