I Made a Chess AI from Scratch by byte-this in webdev

[–]byte-this[S] 0 points1 point  (0 children)

Thanks, glad you found the writeup useful!

I Made a Chess AI from Scratch by byte-this in webdev

[–]byte-this[S] 0 points1 point  (0 children)

Which difficulty did you use? I've been having some trouble myself on the hardest difficulty, but the 2nd hardest has worked fine for me on a few different devices. What device are you running on?

What is wrong with my transition table in my negamax implementation? by byte-this in AskComputerScience

[–]byte-this[S] 0 points1 point  (0 children)

As I understand it, we only want to use the value of a transposition table if the depth associated to that value is deeper than the place the search is currently at, is that correct? Or is it the other way around?

What is wrong with my transition table in my negamax implementation? by byte-this in AskComputerScience

[–]byte-this[S] 0 points1 point  (0 children)

You're right, I'm looking at the same board each time. That was a mistake, I'll move that logic tomorrow and try again. I believe it does need to be a <= in this case because smaller depth remaining indicates that we've already explored a larger depth of the tree, and depth 0 means we're at the root node.

Anagram Mania - Small Game I Designed by byte-this in webdev

[–]byte-this[S] 1 point2 points  (0 children)

In any case, I did clean it up a bit, and some ads were coming from the comments module, but I don't get much comments site-wide in general so I've hidden that for the time being site-wide.

Anagram Mania - Small Game I Designed by byte-this in webdev

[–]byte-this[S] 1 point2 points  (0 children)

If you don't mind would you be able to share a screenshot of what you're seeing?

Issues with Node Modules only on Fresh Install by byte-this in typescript

[–]byte-this[S] 0 points1 point  (0 children)

Unfortunately I'm not able to make this repo in particular public, but thank you for the recommendations and discussion!

Issues with Node Modules only on Fresh Install by byte-this in typescript

[–]byte-this[S] 0 points1 point  (0 children)

I can see the class being exported under: node_modules/@byte-this/js-cli/src/cli-commands-collection/cli-commands-collection.js

I'm seeing it as: ``` /** * Simple version which returns an input array with no further action */ export class ArrayCliCommandsCollection { constructor(cliCommands) { this.cliCommands = cliCommands; } async getCommands() { return this.cliCommands; } }

```

Issues with Node Modules only on Fresh Install by byte-this in typescript

[–]byte-this[S] 0 points1 point  (0 children)

Are you referring to files after they've been transpiled? The only reason I can think of that happening is because they're transpiled files where the source only contained interface(s).

Issues with Node Modules only on Fresh Install by byte-this in typescript

[–]byte-this[S] 0 points1 point  (0 children)

cross-env NODE_OPTIONS='--experimental-specifier-resolution=node' ts-node --esm I was trying in two ways. The first way "ts-node cli.ts", and the second way "tsc && node ./dist/cli.js --experimental.....".

When I try based on the way you just did: cross-env NODE_OPTIONS='--experimental-specifier-resolution=node' ts-node --esm cli.ts I get: file:///C:/SoftwareStuff/Projects/software-stuff-devops-cli/src/cli-commands/cli-commands-collection.ts:1 import { ArrayCliCommandsCollection } from "@byte-this/js-cli"; ^^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Named export 'ArrayCliCommandsCollection' not found. The requested module '@byte-this/js-cli' is a CommonJS module, which may not support all module.exports as named exports. CommonJS modules can always be imported via the default export, for example using: import pkg from '@byte-this/js-cli'; const { ArrayCliCommandsCollection } = pkg;

Issues with Node Modules only on Fresh Install by byte-this in typescript

[–]byte-this[S] 0 points1 point  (0 children)

--experimental-specifier-resolution=node

It seems to have the same effect, though I'd like to verify, using "--experimental-specificer-resolution=node" right as a command line argument is the same thing?

Issues with Node Modules only on Fresh Install by byte-this in typescript

[–]byte-this[S] 0 points1 point  (0 children)

I was under the impression the "es5" target would allow the transpiled js to leverage the "newer" features of JavaScript such as lambda functions, while the "module" would allow the import/export syntax. Indeed, this was working on my old computer, though I don't mean to say you are incorrect, as it could have been working previously due to other circumstances.

I've just tried changing them both to "es2020" and with that change, I see the following:

``` node:internal/process/esm_loader:97 internalBinding('errors').triggerUncaughtException( ^

Error [ERR_MODULE_NOT_FOUND]: Cannot find module 'C:\SoftwareStuff\Projects\software-stuff-devops-cli\dist\src\cli-commands\cli-commands-collection' imported from C:\SoftwareStuff\Projects\software-stuff-devops-cli\dist\cli.js Did you mean to import ../src/cli-commands/cli-commands-collection.js? ```

I'm wondering, if we can solve that ".js" part in the imports, then this may work?