-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Friendly Reminder #7
Comments
I'm working on A* still. It runs, but it doesn't finish. It just runs forever. I tried running it overnight. It never finished. So I'm thinking there's a bug somewhere. It shouldn't take that long. |
The Issue I was having was in State and StateManager. I'm finishing up the main Shortly so you can use the console. |
I've been debugging and refactoring State and StateManager through much of the morning. I hope we weren't trying to fix the same bugs. In either case, I tested the randomizer, state default constructor and print array last night and that all seems to works. |
I don't think we were, these were compile and red line errors |
dang it.. Thought I would get to my bad math before anyone would see it... anyways, There is a runnable main now. Just add your method call under its spot in the switch statement |
Okay. I had to add a lot to the state manager. I won't commit my changes. However, I added a heuristic which is consistent. The goal should be 0 and less solved states are higher valued. There are also aspects that A* needs that I added to statemanager. When we meet, we can consolidate my changes and see how we can best implement them. |
I'm still doing some debugging of the statemanager and I'm coding it as another branch for now. As far as I can tell the comparison expressions were off which I changed along with another array error. I was going to do heuristic algorithm next. How are you measuring how far you are from the goal state? I can think of a couple of ways to do it honestly. |
So I just got the A* algorithm to work. I will commit all of my stuff into a separate branch so that you guys can see it. Apparently some puzzle states are not solvable. Which is surprising, but apparently true. I just went to an online game and had it generate a state for me so that I knew it would work. |
I just looked it up, mathematically about half of the starting states are unsolvable. Right now my randomizer starts with the game in order and goes through each piece and randomly swaps them out. But I could rewrite the method so it actually moves the pieces x number of times and thus always starts with a solvable solution. Do you think I should do that? |
Yeah, I was actually thinking about that. It should be super easy with my next move algorithm to just swap places a whole bunch of times. It's possible with Jacob's function too, but you will have to check for nulls. That shouldn't be a problem though. If you want to get fancy with it, you could try a hill-climbing algorithm to make a very unsolved state. I'm also on hangouts right now. So we can chat through there. Here's the invite if you need it https://hangouts.google.com/group/S7DevyohLJ0z3scy2 |
Please NEVER commit broken code to the master branch. If you haven't finished what you are working on and you cant fix all bugs, then please create a new branch for your code. Thank you, I went to work on the project but had to debug someone's code before I could start. Master Branch should be bug less now
The text was updated successfully, but these errors were encountered: