Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Unrandomize enemy shooting #13

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

Conversation

noah-mcaulay
Copy link
Collaborator

  • Unrandomized enemy shooting by using an array of random numbers that are seeded the same each time (in function reset), and the row/column of the enemy shooting is determined by this random array (in function make_enemies_shoot).

  • Unrelated, but I auto-formatted the file to convert all tabs to spaces to get rid of some annoying issues with my interpreter. Hopefully this shouldn't affect anyone, and should be able to be safely merged in.

resolves #12

… used

to determine which row/column enemy will shoot. Currently there are
difficulties with computer ticks still creating random results that are
fairly similar to each other.
@noah-mcaulay
Copy link
Collaborator Author

noah-mcaulay commented Nov 19, 2017

One issue we might see is that since I used a seed value in reset it will affect our random agent's actions, and any other situation where people use random. If needed we can store the random numbers in a file to prevent seeding in the project. This is fixed by just re-seeding the random right after we generate the seeded random numbers (duh...).

@noah-mcaulay
Copy link
Collaborator Author

I added in a flag (-u) which will turn on the un-randomized enemy shooting. If the flag is not specified in the args then the default is off (enemy shots will be random).

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

unrandomize enemy shooting
1 participant