EkBass
Silver Coder
So, finally i decided to test this thing i have heard of about. After having fun with it last evening, i wanted to see what it can do.
Now first i asked it to create something with JS, like build a bouncing balls to canvas etc. I did help it a lot. It really can do magic stuff, but like human it does f**c up time to time.
But with out any code, i just gave it next message.
Please create a game with C# in console following next rules.
1. Human player versus cpu
2. Normal six side dice
3. Both throws a dice once, then it's opponents turn to throw.
4. Value of throw is added to player personal totalvalue
5. Both can once half their totalvalue. If player choose so, totalvalue is dived by 2. Use integers
6. Both can throw as many times as they want except if totalvalue goes over 19, player loose
7. If player totalvalue is 19, he wins
8. Player can choose not to throw anymore, but other one can still throw dice aslong as possible.
9. Print cpu decisions on screen too.
10. The one who ends closer to 19 wins
It replied "Sure, here is a simple game that follows the rules you have specified:" and did write around 60 lines of code. I tried it with Visual Studio and compiled just fine. Now there was some logic issues thoug. It allowed dividing the totalvalue endlessly and there was no any logic behind of it, so it did half randomly 50% times. So i gave it a new message. You misunderstood. Either one can half their totalvalue only once. Please add some thinking to code when cpu should half its totalvalue
It replied "I apologize for misunderstanding your requirements. Here is an updated version of the game that allows each player to half their total value only once and adds some logic for the CPU to decide whether to half its total value:"
Now next code was fixed what comes for halfing the total only once. Logic when cpu does half its total was bit silly, it does so if total is 15 or more. There is still 4 out of 6 chance to get closer of 19, but who im talking here.
By studying the screen i noticed that cpu had half its value at one point, but there was no message about it. So i send it a message "add somekind of output when cpu half its totalvalue so human knows it" but fortunately i got "Too many requests in 1 hour. Try again later." error message. I had some fun with it before asking this game, so i can blame only myself here.
Anyway, ill wait and ask to do previous thing. Beside of that, ill ask to rethink some algorithm when cpu should half its total value. And ask for a new game. Once its done, ill paste whole code here.
Once the code is done, im considering to ask AI to port it to some other language, just for fun. What i have seen for now, AI wont replace professional coders yet. Maybe in future, but not yet. But its good enough to create code for some purposes. What i studied its logic with JS, it can create collision detection etc. But then i asked questions as programmer does. Now i play dumb.
Now first i asked it to create something with JS, like build a bouncing balls to canvas etc. I did help it a lot. It really can do magic stuff, but like human it does f**c up time to time.
But with out any code, i just gave it next message.
Please create a game with C# in console following next rules.
1. Human player versus cpu
2. Normal six side dice
3. Both throws a dice once, then it's opponents turn to throw.
4. Value of throw is added to player personal totalvalue
5. Both can once half their totalvalue. If player choose so, totalvalue is dived by 2. Use integers
6. Both can throw as many times as they want except if totalvalue goes over 19, player loose
7. If player totalvalue is 19, he wins
8. Player can choose not to throw anymore, but other one can still throw dice aslong as possible.
9. Print cpu decisions on screen too.
10. The one who ends closer to 19 wins
It replied "Sure, here is a simple game that follows the rules you have specified:" and did write around 60 lines of code. I tried it with Visual Studio and compiled just fine. Now there was some logic issues thoug. It allowed dividing the totalvalue endlessly and there was no any logic behind of it, so it did half randomly 50% times. So i gave it a new message. You misunderstood. Either one can half their totalvalue only once. Please add some thinking to code when cpu should half its totalvalue
It replied "I apologize for misunderstanding your requirements. Here is an updated version of the game that allows each player to half their total value only once and adds some logic for the CPU to decide whether to half its total value:"
Now next code was fixed what comes for halfing the total only once. Logic when cpu does half its total was bit silly, it does so if total is 15 or more. There is still 4 out of 6 chance to get closer of 19, but who im talking here.
By studying the screen i noticed that cpu had half its value at one point, but there was no message about it. So i send it a message "add somekind of output when cpu half its totalvalue so human knows it" but fortunately i got "Too many requests in 1 hour. Try again later." error message. I had some fun with it before asking this game, so i can blame only myself here.
Anyway, ill wait and ask to do previous thing. Beside of that, ill ask to rethink some algorithm when cpu should half its total value. And ask for a new game. Once its done, ill paste whole code here.
Once the code is done, im considering to ask AI to port it to some other language, just for fun. What i have seen for now, AI wont replace professional coders yet. Maybe in future, but not yet. But its good enough to create code for some purposes. What i studied its logic with JS, it can create collision detection etc. But then i asked questions as programmer does. Now i play dumb.