Skip to content
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

Working code #3

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

derekthompson
Copy link

Thought all my command-line 'git commit -a' stuff was coming through to you, but now not so sure. Apologies - I'm new to Git, although I'm comfortable with subversion. Anyhow - code works, not the greatest interface, not really a "pretty html and css" guy to be honest. And although nobody will beat the AI, I'm certain that there must be a better decision-making algorithm - mine is quite mechanical, just works through possible board configurations, not really an... elegant solution. That is my thing - I'll probably obsess on this problem for a couple more days until I can find a more appealing solution.

Thanks for the opportunity!
Derek Thompson

is a day and a half into using git - hey, I had it forked perfect the
first time, did my commits, pushed back to the remote repository... went
in to send the pull request and noticed that the instructions were
written by Richard B.  Then I realized you had forked from his original
branch and saw that he was with Cox Media and jumped to a conclusion -
deleted this fork, went and forked from him, repeated process, figured
I was set.  Now I hear I had it right the first time?

Hey - that's only two strikes!  Anyhow, hope you like the code itself.  I
know that actually using tables (models.py) was total overkill, the app
actually zeros out the tables at the end of each game, but I figured it
was a chance to show familiarty with Django's MVC structure.  Also -
hey, the presentation is plain jane, I didn't take the time to add any
fancy front-end stuff, hoping you're more concerned with the classes
and methods - the logic of the app.  It's fine along those lines - I don't
think anyone can beat it, anyhow - but I also think the decision making
is too... mechanical.  It's too much description of all possible moves and
appropriate reactions, it would have been way cooler to come up with a
general decision making algorithm or a couple that would apply to large
sets of possible states.  Something to think on.

Maybe something where the AI looks at all possible upcoming moves two
moves deep and responds appropriately.  Anyhow, while the lack of fancy
CSS and HTML bothers me not a bit, the possibility that there is likely
a more elegant AI algorithm does - something I'll have to think on.

Cheers!
Derek Thompson
and updated AI.  Test framework simply fills player's role and displays
situations were player wins.  Ran it on 1000 game loops until it stopped
revealing flaws.  Then ran it 100000 times.  No wins.  Looks good.
Should have built test framework first.
Cheers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant